Messages in this thread | | | Date | Tue, 12 Feb 2019 23:25:45 +0300 | From | Yauhen Kharuzhy <> | Subject | Re: [PATCH 1/2] leds: Add Intel Cherry Trail Whiskey Cove PMIC LEDs |
| |
On Mon, Feb 11, 2019 at 02:17:26PM +0100, Pavel Machek wrote: > Hi! > > > +static struct cht_wc_led cht_wc_leds[] = { > > + { > > + .name = "pmic::charge", > > + .ctrl_reg = CHT_WC_LED1_CTRL, > > + .fsm_reg = CHT_WC_LED1_FSM, > > + .pwm_reg = CHT_WC_LED1_PWM, > > + .enable_mask = CHT_WC_LED1_ON, > > + }, > > + { > > + .name = "pmic::gpled", > > + .ctrl_reg = CHT_WC_LED2_CTRL, > > + .fsm_reg = CHT_WC_LED2_FSM, > > + .pwm_reg = CHT_WC_LED2_PWM, > > + .enable_mask = CHT_WC_LED2_ON, > > + }, > > +}; > > Unfortunately, these LED names will not be too useful for > userspace. What about "platform::charging" and "status-led::"?
That sounds reasonable.
> > Should we have some default triggers?
I don't know which triggers may be suitable for this. There are no generic "is charging now" triggers in kernel. I can set default trigger of charging led to 'bq27542-0-charging-blink-full-solid' as example but it will valid for platforms with bq27542 battery fuel gauge, of course.
For status led, 'default-on' should be reasonable.
> Pavel
-- Yauhen Kharuzhy
| |