mirror of
https://github.com/Fishwaldo/Star64_linux.git
synced 2025-07-21 22:32:45 +00:00
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:
parent
2cb5cd90f4
commit
3ad1f3a332
3 changed files with 140 additions and 8 deletions
|
@ -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;
|
||||
};
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue