pwm: Implement some checks for lowlevel drivers
There are some expectations which the callbacks provided by lowlevel drivers should fulfill. Implement checks that help driver authors to get these semantics right. As these have some overhead the checks can be disabled using a Kconfig setting. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Thierry Reding <thierry.reding@gmail.com>
This commit is contained in:

committed by
Thierry Reding

parent
2cb5cd90f4
commit
3ad1f3a332
@@ -71,7 +71,8 @@ struct pwm_state {
|
||||
* @chip: PWM chip providing this PWM device
|
||||
* @chip_data: chip-private data associated with the PWM device
|
||||
* @args: PWM arguments
|
||||
* @state: curent PWM channel state
|
||||
* @state: last applied state
|
||||
* @last: last implemented state (for PWM_DEBUG)
|
||||
*/
|
||||
struct pwm_device {
|
||||
const char *label;
|
||||
@@ -83,6 +84,7 @@ struct pwm_device {
|
||||
|
||||
struct pwm_args args;
|
||||
struct pwm_state state;
|
||||
struct pwm_state last;
|
||||
};
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user