Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-05-02 Thread Andy Shevchenko
On Thu, 2018-04-26 at 13:49 +0100, Javier Arteaga wrote: > On Thu, Apr 26, 2018 at 10:55:49AM +0300, Andy Shevchenko wrote: > > On Thu, 2018-04-26 at 03:34 +0100, Javier Arteaga wrote: > > > My understanding was that in this context, __init allows this > > > probe() > > > to > > > be dropped from m

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-27 Thread Lee Jones
On Thu, 26 Apr 2018, Javier Arteaga wrote: [...] > > > static const struct regmap_range upboard_up2_readable_ranges[] = { > > > @@ -116,7 +124,18 @@ static const struct regmap_config > > > upboard_up2_regmap_config = { > > > .wr_table = &upboard_up2_writable_table, > > > }; > > > > > > +st

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-26 Thread Javier Arteaga
Hi Lee, On Thu, Apr 26, 2018 at 08:34:05AM +0100, Lee Jones wrote: > > drivers/mfd/upboard.c | 19 > > This change needs to be placed into a separate patch. OK. I'll do ("add driver" -> "add cell") pairs of patches then. > > +#define UPBOARD_LED_CELL(led_data, n)

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-26 Thread Javier Arteaga
Thanks Andy for these pointers :) On Thu, Apr 26, 2018 at 10:55:49AM +0300, Andy Shevchenko wrote: > On Thu, 2018-04-26 at 03:34 +0100, Javier Arteaga wrote: > > My understanding was that in this context, __init allows this probe() > > to > > be dropped from memory after module load. > > > > What

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-26 Thread Andy Shevchenko
On Thu, 2018-04-26 at 03:34 +0100, Javier Arteaga wrote: > On Wed, Apr 25, 2018 at 07:15:45PM +0300, Andy Shevchenko wrote: > > On Sat, 2018-04-21 at 09:50 +0100, Javier Arteaga wrote: > > > +static int __init upboard_led_probe(struct platform_device *pdev) > > > > Are you sure about __init here?

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-26 Thread Lee Jones
On Sat, 21 Apr 2018, Javier Arteaga wrote: > Allow userspace to use the on-board LEDs as "upboard::". > > Signed-off-by: Javier Arteaga > --- > drivers/leds/Kconfig| 10 + > drivers/leds/Makefile | 1 + > drivers/leds/leds-upboard.c | 87 +

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-25 Thread Javier Arteaga
On Wed, Apr 25, 2018 at 07:15:45PM +0300, Andy Shevchenko wrote: > On Sat, 2018-04-21 at 09:50 +0100, Javier Arteaga wrote: > > Allow userspace to use the on-board LEDs as "upboard::". > > > + struct upboard_led *led = container_of(cdev, struct > > upboard_led, cdev); > > #define to_upboard_led

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-25 Thread Andy Shevchenko
On Sat, 2018-04-21 at 09:50 +0100, Javier Arteaga wrote: > Allow userspace to use the on-board LEDs as "upboard::". > + struct upboard_led *led = container_of(cdev, struct > upboard_led, cdev); #define to_upboard_led(cdev) container_of(cdev, struct upboard_led, cdev) ... led = to_upboard_led

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-25 Thread Pavel Machek
Hi! > > If it is single bit, max_brightness should be one, and != LED_OFF test > > should not be needed. > > Got it. Will do for v2. Good, you can add Acked-by: Pavel Machek for the v2. Pavel -- (english) http://www.live

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-25 Thread Javier Arteaga
Hi Pavel, On Wed, Apr 25, 2018 at 08:41:33AM +0200, Pavel Machek wrote: > On Sat 2018-04-21 09:50:08, Javier Arteaga wrote: > > Allow userspace to use the on-board LEDs as "upboard::". > > > > Signed-off-by: Javier Arteaga > > > +static enum led_brightness upboard_led_brightness_get(struct led_

Re: [RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-24 Thread Pavel Machek
On Sat 2018-04-21 09:50:08, Javier Arteaga wrote: > Allow userspace to use the on-board LEDs as "upboard::". > > Signed-off-by: Javier Arteaga > +static enum led_brightness upboard_led_brightness_get(struct led_classdev > *cdev) > +{ > + struct upboard_led *led = container_of(cdev, struct u

[RFC PATCH RESEND 2/3] leds: upboard: Add LED support

2018-04-21 Thread Javier Arteaga
Allow userspace to use the on-board LEDs as "upboard::". Signed-off-by: Javier Arteaga --- drivers/leds/Kconfig| 10 + drivers/leds/Makefile | 1 + drivers/leds/leds-upboard.c | 87 + drivers/mfd/upboard.c | 19 include/linux/