-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
drivers: entropy: add maxq10xx #83797
drivers: entropy: add maxq10xx #83797
Conversation
b9671de
to
25990c8
Compare
This looks weird to me. IMHO, the MAXQ10xx is a multi function device, not just a random number generator. Therefore, it should be implemented as such. |
25990c8
to
77902a6
Compare
77902a6
to
73387de
Compare
Agreed, maxq10xx family is secure authenticator that supports multiple function, the implementation of them shall not be restrict it for TRNG. I think there might be a new driver class folder like: "drivers/auth" for authenticator OR existing crypto driver interface be extended then used as crypto device. |
@ozersa I already changed it to mfd. so that the crypto or auth driver can be added later |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks ok to me.
ping @ozersa |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for enabling maxq10xx on zephyr.
Sorry for late response.
#ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ1XX_H_ | ||
#define ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ1XX_H_ | ||
|
||
#include <zephyr/device.h> | ||
#include <zephyr/kernel.h> | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
||
/** | ||
* @brief Get the semaphore reference for a MAXQ1xx instance. Callers | ||
* should pass the return value to k_sem_take/k_sem_give | ||
* | ||
* @param[in] dev Pointer to device struct of the driver instance | ||
* | ||
* @return Address of the semaphore | ||
*/ | ||
struct k_sem *mfd_maxq10xx_get_lock(const struct device *dev); | ||
|
||
|
||
#ifdef __cplusplus | ||
} | ||
#endif | ||
|
||
#endif /* ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ1XX_H_ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
#ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ1XX_H_ | |
#define ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ1XX_H_ | |
#include <zephyr/device.h> | |
#include <zephyr/kernel.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
/** | |
* @brief Get the semaphore reference for a MAXQ1xx instance. Callers | |
* should pass the return value to k_sem_take/k_sem_give | |
* | |
* @param[in] dev Pointer to device struct of the driver instance | |
* | |
* @return Address of the semaphore | |
*/ | |
struct k_sem *mfd_maxq10xx_get_lock(const struct device *dev); | |
#ifdef __cplusplus | |
} | |
#endif | |
#endif /* ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ1XX_H_ */ | |
#ifndef ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ10XX_H_ | |
#define ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ10XX_H_ | |
#include <zephyr/device.h> | |
#include <zephyr/kernel.h> | |
#ifdef __cplusplus | |
extern "C" { | |
#endif | |
/** | |
* @brief Get the semaphore reference for a MAXQ1xx instance. Callers | |
* should pass the return value to k_sem_take/k_sem_give | |
* | |
* @param[in] dev Pointer to device struct of the driver instance | |
* | |
* @return Address of the semaphore | |
*/ | |
struct k_sem *mfd_maxq10xx_get_lock(const struct device *dev); | |
#ifdef __cplusplus | |
} | |
#endif | |
#endif /* ZEPHYR_INCLUDE_DRIVERS_MFD_MAXQ10XX_H_ */ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall nice! Just some minor remarks.
add maxq10xx entropy device. Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
add maxq10xx mfd device to tests Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
73387de
to
3223822
Compare
@ceolin please re-approve as the maintainer |
add maxq10xx entropy device.