Message ID | 1645509309-16142-3-git-send-email-quic_c_skakit@quicinc.com (mailing list archive) |
---|---|
State | Not Applicable |
Headers | show |
Series | Add PM8350C PMIC PWM support for backlight | expand |
On Mon 21 Feb 21:55 PST 2022, Satya Priya wrote: > Add pm8350c compatible and lpg_data to the driver. > > Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com> > Reviewed-by: Matthias Kaehlcke <mka@chromium.org> > Reviewed-by: Stephen Boyd <swboyd@chromium.org> Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> > --- > Changes in V2: > - Added const for lpg_channel_data[] struct. > > Changes in V3: > - Correct the num_channels and add respective base addresses. > > Changes in V4: > - Remove .pwm_9bit_mask, add .triled_base and .triled_mask. This changed the patch quite a bit. In general when this happen I would suggest that you don't keep previously acquired Reviewed-bys. Regards, Bjorn > > drivers/leds/rgb/leds-qcom-lpg.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) > > diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c > index c1ad678..ab29610 100644 > --- a/drivers/leds/rgb/leds-qcom-lpg.c > +++ b/drivers/leds/rgb/leds-qcom-lpg.c > @@ -1374,9 +1374,22 @@ static const struct lpg_data pm8150l_lpg_data = { > }, > }; > > +static const struct lpg_data pm8350c_pwm_data = { > + .triled_base = 0xef00, > + > + .num_channels = 4, > + .channels = (const struct lpg_channel_data[]) { > + { .base = 0xe800, .triled_mask = BIT(7) }, > + { .base = 0xe900, .triled_mask = BIT(6) }, > + { .base = 0xea00, .triled_mask = BIT(5) }, > + { .base = 0xeb00 }, > + }, > +}; > + > static const struct of_device_id lpg_of_table[] = { > { .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data }, > { .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data }, > + { .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data }, > { .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data }, > { .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data }, > { .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data }, > -- > 2.7.4 >
Quoting Satya Priya (2022-02-21 21:55:07) > Add pm8350c compatible and lpg_data to the driver. > > Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com> > Reviewed-by: Matthias Kaehlcke <mka@chromium.org> > Reviewed-by: Stephen Boyd <swboyd@chromium.org> > --- Still Reviewed-by: Stephen Boyd <swboyd@chromium.org>
Hi, On Mon, Feb 21, 2022 at 9:55 PM Satya Priya <quic_c_skakit@quicinc.com> wrote: > > Add pm8350c compatible and lpg_data to the driver. > > Signed-off-by: Satya Priya <quic_c_skakit@quicinc.com> > Reviewed-by: Matthias Kaehlcke <mka@chromium.org> > Reviewed-by: Stephen Boyd <swboyd@chromium.org> > --- > Changes in V2: > - Added const for lpg_channel_data[] struct. > > Changes in V3: > - Correct the num_channels and add respective base addresses. > > Changes in V4: > - Remove .pwm_9bit_mask, add .triled_base and .triled_mask. > > drivers/leds/rgb/leds-qcom-lpg.c | 13 +++++++++++++ > 1 file changed, 13 insertions(+) Tested-by: Douglas Anderson <dianders@chromium.org> I'm very interested in knowing if there's anything blocking this patch (and the one from Bjorn that it depends on) from landing. Thanks! :-) -Doug
diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c index c1ad678..ab29610 100644 --- a/drivers/leds/rgb/leds-qcom-lpg.c +++ b/drivers/leds/rgb/leds-qcom-lpg.c @@ -1374,9 +1374,22 @@ static const struct lpg_data pm8150l_lpg_data = { }, }; +static const struct lpg_data pm8350c_pwm_data = { + .triled_base = 0xef00, + + .num_channels = 4, + .channels = (const struct lpg_channel_data[]) { + { .base = 0xe800, .triled_mask = BIT(7) }, + { .base = 0xe900, .triled_mask = BIT(6) }, + { .base = 0xea00, .triled_mask = BIT(5) }, + { .base = 0xeb00 }, + }, +}; + static const struct of_device_id lpg_of_table[] = { { .compatible = "qcom,pm8150b-lpg", .data = &pm8150b_lpg_data }, { .compatible = "qcom,pm8150l-lpg", .data = &pm8150l_lpg_data }, + { .compatible = "qcom,pm8350c-pwm", .data = &pm8350c_pwm_data }, { .compatible = "qcom,pm8916-pwm", .data = &pm8916_pwm_data }, { .compatible = "qcom,pm8941-lpg", .data = &pm8941_lpg_data }, { .compatible = "qcom,pm8994-lpg", .data = &pm8994_lpg_data },