Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1191593 > unrolled thread
| Started by | Lee Jones <lee.jones@linaro.org> |
|---|---|
| First post | 2015-07-24 10:30 +0200 |
| Last post | 2015-07-24 10:30 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH] backlight: pm8941-wled: Add default-brightness property Lee Jones <lee.jones@linaro.org> - 2015-07-24 10:30 +0200
| From | Lee Jones <lee.jones@linaro.org> |
|---|---|
| Date | 2015-07-24 10:30 +0200 |
| Subject | Re: [PATCH] backlight: pm8941-wled: Add default-brightness property |
| Message-ID | <pPGwF-dy-7@gated-at.bofh.it> |
On Thu, 23 Jul 2015, Bjorn Andersson wrote: > Add the possibility of specifying the default brightness in DT. > > Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> > --- > > This depends on the patch moving pm8941-wled to backlight [1]. The dt property > is used by several other backlight drivers, so I considered this to be a > "common" property and it's hence not prefixed with "qcom,". > > [1] https://lkml.org/lkml/2015/7/21/906 > > Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt | 1 + This needs to be in a seperate patch. > drivers/video/backlight/pm8941-wled.c | 4 ++++ You can't send patches on top of non-existent drivers. > 2 files changed, 5 insertions(+) > > diff --git a/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt b/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt > index 424f8444a6cd..37503f8c3620 100644 > --- a/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt > +++ b/Documentation/devicetree/bindings/video/backlight/pm8941-wled.txt > @@ -5,6 +5,7 @@ Required properties: > - reg: slave address > > Optional properties: > +- default-brightness: value from: 0-4095 > - label: The name of the backlight device > - qcom,cs-out: bool; enable current sink output > - qcom,cabc: bool; enable content adaptive backlight control > diff --git a/drivers/video/backlight/pm8941-wled.c b/drivers/video/backlight/pm8941-wled.c > index c704c3236034..b875e58df0fc 100644 > --- a/drivers/video/backlight/pm8941-wled.c > +++ b/drivers/video/backlight/pm8941-wled.c > @@ -373,6 +373,7 @@ static int pm8941_wled_probe(struct platform_device *pdev) > struct backlight_device *bl; > struct pm8941_wled *wled; > struct regmap *regmap; > + u32 val = 0; > int rc; > > regmap = dev_get_regmap(pdev->dev.parent, NULL); > @@ -395,8 +396,11 @@ static int pm8941_wled_probe(struct platform_device *pdev) > if (rc) > return rc; > > + of_property_read_u32(pdev->dev.of_node, "default-brightness", &val); > + > memset(&props, 0, sizeof(struct backlight_properties)); > props.type = BACKLIGHT_RAW; > + props.brightness = val; > props.max_brightness = PM8941_WLED_REG_VAL_MAX; > bl = devm_backlight_device_register(&pdev->dev, wled->name, > &pdev->dev, wled, -- Lee Jones Linaro STMicroelectronics Landing Team Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web