Message ID | 1608547554-6602-1-git-send-email-gene.chen.richtek@gmail.com |
---|---|
Headers | show |
Series | leds: mt6360: Add LED driver for MT6360 | expand |
On 21/12/2020 11:45, Gene Chen wrote: > From: Gene Chen <gene_chen@richtek.com> [...] > + > +static const struct of_device_id __maybe_unused mt6360_led_of_id[] = { > + { .compatible = "mediatek,mt6360-led", }, > + {} > +}; > +MODULE_DEVICE_TABLE(of, mt6360_led_of_id); > + I think we should fix MFD code to not need to use a DT binding here. See [1]. Regards, Matthias [1] https://lore.kernel.org/linux-mediatek/20210111164118.GE4728@sirena.org.uk/ > +static struct platform_driver mt6360_led_driver = { > + .driver = { > + .name = "mt6360-led", > + .of_match_table = mt6360_led_of_id, > + }, > + .probe = mt6360_led_probe, > + .remove = mt6360_led_remove, > +}; > +module_platform_driver(mt6360_led_driver); > + > +MODULE_AUTHOR("Gene Chen <gene_chen@richtek.com>"); > +MODULE_DESCRIPTION("MT6360 LED Driver"); > +MODULE_LICENSE("GPL v2"); >
Hi! > From: Gene Chen <gene_chen@richtek.com> > > Add LED_FUNCTION_MOONLIGHT definitions > > Signed-off-by: Gene Chen <gene_chen@richtek.com> > Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> > Acked-by: Rob Herring <robh@kernel.org> No, sorry, I don't believe we need another define for flash/torch. Best regards, Pavel
Hi! > From: Gene Chen <gene_chen@richtek.com> > > Add MT6360 LED driver include 2-channel Flash LED with torch/strobe mode, > 3-channel RGB LED support Register/Flash/Breath Mode, and 1-channel for > moonlight LED. What kind of ninja mutant hardware is this? Can we make this go to drivers/leds/flash? > +static int mt6360_flash_brightness_set(struct led_classdev_flash *fl_cdev, u32 brightness) > +{ > + /* > + * Due to the current spike when turning on flash, let brightness to be kept by framework. > + * This empty function is used to prevent led_classdev_flash register ops check failure. > + */ Please stick to 80 columns. > +static int mt6360_init_common_properties(struct mt6360_led *led, struct led_init_data *init_data) > +{ > + const char * const states[] = { "off", "keep", "on" }; No need for space between * and const. Best regards, Pavel -- http://www.livejournal.com/~pavelmachek
Pavel Machek <pavel@ucw.cz> 於 2021年2月19日 週五 下午6:47寫道: > > Hi! > > > From: Gene Chen <gene_chen@richtek.com> > > > > Add LED_FUNCTION_MOONLIGHT definitions > > > > Signed-off-by: Gene Chen <gene_chen@richtek.com> > > Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> > > Acked-by: Rob Herring <robh@kernel.org> > > No, sorry, I don't believe we need another define for flash/torch. > As previous discuss, > We use term "Moonlight" as reference says > "When you are trying to imitate moonlight you need to use low voltage, > softer lighting. You don’t want something that’s too bright" > which is focus on brightness instead of color. If any concern about this change, maybe we use LED_FUNCTION_INDICATOR instead? (refs: https://lkml.org/lkml/2020/11/24/1267) > Best regards, > Pavel > -- > http://www.livejournal.com/~pavelmachek
Gene Chen <gene.chen.richtek@gmail.com> 於 2021年3月2日 週二 下午2:08寫道: > > Pavel Machek <pavel@ucw.cz> 於 2021年2月19日 週五 下午6:47寫道: > > > > Hi! > > > > > From: Gene Chen <gene_chen@richtek.com> > > > > > > Add LED_FUNCTION_MOONLIGHT definitions > > > > > > Signed-off-by: Gene Chen <gene_chen@richtek.com> > > > Acked-by: Jacek Anaszewski <jacek.anaszewski@gmail.com> > > > Acked-by: Rob Herring <robh@kernel.org> > > > > No, sorry, I don't believe we need another define for flash/torch. > > > > As previous discuss, > > We use term "Moonlight" as reference says > > "When you are trying to imitate moonlight you need to use low voltage, > > softer lighting. You don’t want something that’s too bright" > > which is focus on brightness instead of color. > > If any concern about this change, maybe we use LED_FUNCTION_INDICATOR instead? > (refs: https://lkml.org/lkml/2020/11/24/1267) Is there any update? > > Best regards, > > Pavel > > -- > > http://www.livejournal.com/~pavelmachek