Messages in this thread | | | Date | Tue, 3 Apr 2018 12:49:08 +0200 | From | Pavel Machek <> | Subject | Re: [PATCHv4 08/10] backlight: add TI LMU backlight driver |
| |
Hi!
> +enum ti_lmu_bl_type { > + TI_LMU_BL, /* backlight userspace interface */ > + TI_LMU_LED, /* led userspace interface */ > +}; ... > +static int ti_lmu_bl_add_device(struct ti_lmu_bank *lmu_bank) > +{ > + switch (lmu_bank->type) { > + case TI_LMU_BL: > + return ti_lmu_bl_register_backlight(lmu_bank); > + case TI_LMU_LED: > + return ti_lmu_bl_register_led(lmu_bank); > + default: > + return -EINVAL; > + } > +}
Ok, this is somehow unusual/crazy. Single driver with two interfaces.
Do we need the LED interface for something?
If yes, I believe reasonable solution would be to always provide LED interface, and then have "backlight-trigger" which that would provide backlight interface for arbitrary LED.
Thanks, Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html [unhandled content-type:application/pgp-signature] | |