* Re: [PATCH 0/6] HID/arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on
From: Johan Hovold @ 2024-04-24 8:50 UTC (permalink / raw)
To: Doug Anderson
Cc: Johan Hovold, Jiri Kosina, Benjamin Tissoires, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Linus Walleij, linux-input, devicetree,
linux-arm-msm, linux-kernel
In-Reply-To: <CAD=FV=W2Y=Sr-=YkKb01XLQsbQJr2b981c9kcfvAc4_5E9XD7g@mail.gmail.com>
On Tue, Apr 23, 2024 at 01:36:18PM -0700, Doug Anderson wrote:
> On Tue, Apr 23, 2024 at 6:46 AM Johan Hovold <johan+linaro@kernel.org> wrote:
> > The Elan eKTH5015M touch controller on the X13s requires a 300 ms delay
> > before sending commands after having deasserted reset during power on.
> >
> > This series switches the X13s devicetree to use the Elan specific
> > binding so that the OS can determine the required power-on sequence and
> > make sure that the controller is always detected during boot. [1]
> >
> > The Elan hid-i2c driver currently asserts reset unconditionally during
> > suspend, which does not work on the X13s where the touch controller
> > supply is shared with other peripherals that may remain powered. Holding
> > the controller in reset can increase power consumption and also leaks
> > current through the reset circuitry pull ups.
>
> Can you provide more details about which devices exactly it shares
> power with? I'm worried that you may be shooting yourself in the foot
> to avoid shooting yourself in the arm.
>
> Specifically, if those other peripherals that may remain powered ever
> power themselves off then you'll end up back-driving the touchscreen
> through the reset line, won't you? Since reset is active low then not
> asserting reset drives the reset line high and, if you power it off,
> it can leach power backwards through the reset line. The
> "goodix,no-reset-during-suspend" property that I added earlier
> specifically worked on systems where the rail was always-on so I could
> guarantee that didn't happen.
>
> From looking at your dts patch it looks like your power _is_ on an
> always-on rail so you should be OK, but it should be documented that
> this only works for always-on rails.
>
> ..also, from your patch description it sounds as if (maybe?) you
> intend to eventually let the rail power off if the trackpad isn't a
> wakeup source. If you eventually plan to do that then you definitely
> need something more complex here...
No, that's the whole point: the hardware is designed so that the reset
line can be left deasserted by the CPU also when the supply is off.
The supply in this case is shared with the keyboard and touchpad, but
also some other devices which are not yet fully described. As you
rightly noted, the intention is to allow the supply to eventually be
disabled when none of these devices are enabled as wakeup sources.
I did not want to get in to too much details on exactly how this
particular reset circuit is designed, but basically you have a pull up
to an always-on 1.8 V rail on the CPU side, a FET level shifter, and a
pull up to the supply voltage on the peripheral side.
With this design, the reset line can be left deasserted by the CPU
(tri-stated or driven high), but the important part is that the reset
signal that goes into the controller will be pulled to 3.3 V only when
the supply is left on and otherwise it will be connected to ground.
> > Note that the latter also affects X13s variants where the touchscreen is
> > not populated as the driver also exits probe() with reset asserted.
>
> I assume driving against an external pull is _probably_ not a huge
> deal (should be a pretty small amount of power), but I agree it would
> be nice to fix.
>
> I'm a bit leery of actively driving the reset pin high (deasserting
> the reset) just to match the pull. It feels like in your case it would
> be better to make it an input w/ no pulls. It almost feels like
> something in the pinctrl system should handle this. Something where
> the pin is default "input no pull" at the board level and when the
> driver exits it should go back to the pinctrl default...
If you look at the DT patch that's essentially what I'm doing by
describing the reset pin as open-drain so that it will be configured as
an input (tristated) when reset is deasserted and only driven low when
reset is asserted.
> I guess one last thought is: what do we do if/when someone needs the
> same solution but they want multiple sources of touchscreens, assuming
> we ever get the second-sourcing problem solved well. In that case the
> different touchscreen drivers might have a different idea of how the
> GPIO should be left when the driver exits...
The second-source problem is arguable a separate one, and as we've
discussed in the past, the current approach of describing both devices
in the devicetree only works when the devices are truly compatible in
terms of external resources (supplies, gpios, pinconfig). For anything
more complex, we need a more elaborate implementation.
In this case it should not be a problem, though, as the reset circuit
should have the same properties regardless of which controller you
connect (e.g. both nodes would have the 'no-reset-on-power-off'
property).
Johan
^ permalink raw reply
* Re: [PATCH 2/6] dt-bindings: HID: i2c-hid: elan: add Elan eKTH5015M
From: Krzysztof Kozlowski @ 2024-04-24 8:32 UTC (permalink / raw)
To: Johan Hovold
Cc: Johan Hovold, Jiri Kosina, Benjamin Tissoires, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Linus Walleij, Douglas Anderson, linux-input,
devicetree, linux-arm-msm, linux-kernel
In-Reply-To: <ZiiuxI3GfJQIjxAG@hovoldconsulting.com>
On 24/04/2024 09:03, Johan Hovold wrote:
> On Tue, Apr 23, 2024 at 06:24:39PM +0200, Krzysztof Kozlowski wrote:
>> On 23/04/2024 15:46, Johan Hovold wrote:
>
>>> properties:
>>> compatible:
>>> - items:
>>> - - const: elan,ekth6915
>>> + oneOf:
>>> + - items:
>>> + - enum:
>>> + - elan,ekth5015m
>>> + - const: elan,ekth6915
>>> + - items:
>>
>> Don't re-add the items for this entry. Just const.
>
> Sure. But note that the example schema uses 'items' like this (e.g. for
> 'compatible' and 'clock-names'):
>
> https://docs.kernel.org/devicetree/bindings/writing-schema.html#annotated-example-schema
>
Yes, that's the inconsistency we keep. The point is that clocks usually
have just one list, so one "items:". For compatible there can be many
and it leads to less readable code, e.g.:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/Documentation/devicetree/bindings/mmc/renesas,sdhi.yaml?h=v6.9-rc5#n15
Best regards,
Krzysztof
^ permalink raw reply
* Re: [PATCH 0/6] HID/arm64: dts: qcom: sc8280xp-x13s: fix touchscreen power on
From: Johan Hovold @ 2024-04-24 7:38 UTC (permalink / raw)
To: Steev Klimaszewski
Cc: Johan Hovold, Jiri Kosina, Benjamin Tissoires, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Linus Walleij, Douglas Anderson, linux-input,
devicetree, linux-arm-msm, linux-kernel
In-Reply-To: <CAKXuJqgJXCHSVcj+acnqauXidAFq0oXaaQTF31+-gSCSHK6cVA@mail.gmail.com>
On Tue, Apr 23, 2024 at 02:34:20PM -0500, Steev Klimaszewski wrote:
> On Tue, Apr 23, 2024 at 8:47 AM Johan Hovold <johan+linaro@kernel.org> wrote:
> > Note that my X13s does not have a touchscreen, but I have done partial
> > verification of the implementation using that machine and the sc8280xp
> > CRD reference design. Bjorn has promised to help out with final
> > verification on an X13s with a touchscreen.
> I thought that I'd purchased a Thinkpad X13s without touchscreen, but
> it turns out that I do have one, and since I do, I was able to test
> this patchset, and it works on mine.
>
> Tested-by: Steev Klimaszewski <steev@kali.org>
Thanks for testing, Steev.
Johan
^ permalink raw reply
* Re: [PATCH 3/6] dt-bindings: HID: i2c-hid: elan: add 'no-reset-on-power-off' property
From: Johan Hovold @ 2024-04-24 7:34 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Johan Hovold, Jiri Kosina, Benjamin Tissoires, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Linus Walleij, Douglas Anderson, linux-input,
devicetree, linux-arm-msm, linux-kernel
In-Reply-To: <2e67e4e6-83a7-4153-b6a7-cdec0ab2c171@kernel.org>
On Tue, Apr 23, 2024 at 06:29:44PM +0200, Krzysztof Kozlowski wrote:
> On 23/04/2024 15:46, Johan Hovold wrote:
> > When the power supply is shared with other peripherals the reset line
> > can be wired in such a way that it can remain deasserted regardless of
> > whether the supply is on or not.
>
> To clarify: the reset line is still present and working in such case?
Yes.
> > This is important as it can be used to avoid holding the controller in
> > reset for extended periods of time when it remains powered, something
> > which can lead to increased power consumption. Leaving reset deasserted
> > also avoids leaking current through the reset circuitry pull-up
> > resistors.
> >
> > Add a new 'no-reset-on-power-off' devicetree property which can be used
> > by the OS to determine when reset needs to be asserted on power down.
> >
> > Note that this property can also be used when the supply cannot be
> > turned off by the OS at all.
> > reset-gpios:
> > description: Reset GPIO; not all touchscreens using eKTH6915 hook this up.
> >
> > + no-reset-on-power-off:
>
> Missing vendor prefix. Unless you want to re-use existing property
> "keep-power-in-suspend", but the case here mentions power off, not suspend.
No, I left out the prefix on purpose as I mentioned in the cover letter.
There is nothing vendor specific about this property and I expect it to
be reused for other devices.
And "keep-power-in-suspend" is too specific and indeed looks like
instruction to the OS rather than hw description (more below), but
importantly it is not related to the problem here (which is about
reset, not power).
> Anyway, the property sounds like what the OS should be doing, which is
> not what we want. You basically instruct driver what to do. We want a
> described hardware configuration or hardware specifics.
Right, and this was why I at first rejected a property name like this in
favour of 'reset-pulled-to-supply' in my first draft. That name
obviously does not work as the 'supply' suffix is already claimed, but I
also realised that it doesn't really describe the hardware property that
allows the reset line to remain asserted.
The key feature in this hardware design is that the reset line will not
just be pulled to the supply voltage (what other voltage would it be
pulled to), but that it is also pulled to ground when the supply is
disabled.
Rather than trying to encode this in the property name, I settled on the
descriptive 'no-reset-on-power-off' after the seeing the prior art in
'goodix,no-reset-during-suspend' property. The latter is too specific
and encodes policy, but the former could still be considered hardware
description and would also apply to other designs which have the
property that the reset line should be left deasserted.
One such example is when the supply can not be disabled at all (e.g. the
Goodix case), but I can imagine there being more than one way to design
such reset circuits.
> Reset is pulled to something? What is exactly different in this hardware
> configuration comparing to other hardware setup (regular)?
The power supply is shared with other peripherals and the hardware
designers have made provisions so that the reset line can remain
deasserted regardless of the state of the supply in order to save power.
> > + type: boolean
> > + description:
> > + Reset line is wired so that it can be left deasserted when the power
> > + supply is off.
Johan
^ permalink raw reply
* RE: [PATCH v2 17/19] fbdev: imx: Constify lcd_ops
From: Peng Fan @ 2024-04-24 7:05 UTC (permalink / raw)
To: Krzysztof Kozlowski, Lee Jones, Daniel Thompson, Jingoo Han,
Helge Deller, Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel@lists.freedesktop.org, linux-fbdev@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-input@vger.kernel.org,
linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev,
linux-omap@vger.kernel.org, Thomas Zimmermann
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-17-1aaa82b07bc6@kernel.org>
> Subject: [PATCH v2 17/19] fbdev: imx: Constify lcd_ops
>
> 'struct lcd_ops' is not modified by core backlight code, so it can be made
> const for increased code safety.
>
> Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
> Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
> ---
>
> Depends on the first patch in the series.
> ---
> drivers/video/fbdev/imxfb.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c index
> a4dbc72f93c3..4ebfe9b9df60 100644
> --- a/drivers/video/fbdev/imxfb.c
> +++ b/drivers/video/fbdev/imxfb.c
> @@ -857,7 +857,7 @@ static int imxfb_lcd_set_power(struct lcd_device
> *lcddev, int power)
> return 0;
> }
>
> -static struct lcd_ops imxfb_lcd_ops = {
> +static const struct lcd_ops imxfb_lcd_ops = {
> .check_fb = imxfb_lcd_check_fb,
> .get_contrast = imxfb_lcd_get_contrast,
> .set_contrast = imxfb_lcd_set_contrast,
>
> --
> 2.43.0
>
^ permalink raw reply
* Re: [PATCH 2/6] dt-bindings: HID: i2c-hid: elan: add Elan eKTH5015M
From: Johan Hovold @ 2024-04-24 7:03 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Johan Hovold, Jiri Kosina, Benjamin Tissoires, Dmitry Torokhov,
Rob Herring, Krzysztof Kozlowski, Conor Dooley, Bjorn Andersson,
Konrad Dybcio, Linus Walleij, Douglas Anderson, linux-input,
devicetree, linux-arm-msm, linux-kernel
In-Reply-To: <1dc47644-56c9-4fdc-80cf-756cf4cea54c@linaro.org>
On Tue, Apr 23, 2024 at 06:24:39PM +0200, Krzysztof Kozlowski wrote:
> On 23/04/2024 15:46, Johan Hovold wrote:
> > properties:
> > compatible:
> > - items:
> > - - const: elan,ekth6915
> > + oneOf:
> > + - items:
> > + - enum:
> > + - elan,ekth5015m
> > + - const: elan,ekth6915
> > + - items:
>
> Don't re-add the items for this entry. Just const.
Sure. But note that the example schema uses 'items' like this (e.g. for
'compatible' and 'clock-names'):
https://docs.kernel.org/devicetree/bindings/writing-schema.html#annotated-example-schema
Johan
^ permalink raw reply
* [PATCH v2 19/19] const_structs.checkpatch: add lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Thomas Weißschuh,
Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core code.
Suggested-by: Thomas Weißschuh <linux@weissschuh.net>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Patch making lcd_ops const in progress:
https://lore.kernel.org/r/20240414-video-backlight-lcd-ops-v1-0-9b37fcbf546a@kernel.org
Cc: Lee Jones <lee@kernel.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>
Cc: Jingoo Han <jingoohan1@gmail.com>
Cc: linux-fbdev@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
---
scripts/const_structs.checkpatch | 1 +
1 file changed, 1 insertion(+)
diff --git a/scripts/const_structs.checkpatch b/scripts/const_structs.checkpatch
index fa96cfd16e99..52e5bfb61fd0 100644
--- a/scripts/const_structs.checkpatch
+++ b/scripts/const_structs.checkpatch
@@ -39,6 +39,7 @@ kgdb_arch
kgdb_io
kobj_type
kset_uevent_ops
+lcd_ops
lock_manager_operations
machine_desc
microcode_ops
--
2.43.0
^ permalink raw reply related
* [PATCH v2 18/19] fbdev: omap: lcd_ams_delta: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Thomas Zimmermann,
Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Depends on the first patch in the series.
---
drivers/video/fbdev/omap/lcd_ams_delta.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/omap/lcd_ams_delta.c b/drivers/video/fbdev/omap/lcd_ams_delta.c
index 6f860c814d2c..97e2b71b64d7 100644
--- a/drivers/video/fbdev/omap/lcd_ams_delta.c
+++ b/drivers/video/fbdev/omap/lcd_ams_delta.c
@@ -76,7 +76,7 @@ static int ams_delta_lcd_get_contrast(struct lcd_device *dev)
return ams_delta_lcd & AMS_DELTA_MAX_CONTRAST;
}
-static struct lcd_ops ams_delta_lcd_ops = {
+static const struct lcd_ops ams_delta_lcd_ops = {
.get_power = ams_delta_lcd_get_power,
.set_power = ams_delta_lcd_set_power,
.get_contrast = ams_delta_lcd_get_contrast,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 17/19] fbdev: imx: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Thomas Zimmermann,
Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Depends on the first patch in the series.
---
drivers/video/fbdev/imxfb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/imxfb.c b/drivers/video/fbdev/imxfb.c
index a4dbc72f93c3..4ebfe9b9df60 100644
--- a/drivers/video/fbdev/imxfb.c
+++ b/drivers/video/fbdev/imxfb.c
@@ -857,7 +857,7 @@ static int imxfb_lcd_set_power(struct lcd_device *lcddev, int power)
return 0;
}
-static struct lcd_ops imxfb_lcd_ops = {
+static const struct lcd_ops imxfb_lcd_ops = {
.check_fb = imxfb_lcd_check_fb,
.get_contrast = imxfb_lcd_get_contrast,
.set_contrast = imxfb_lcd_set_contrast,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 16/19] fbdev: clps711x: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Thomas Zimmermann,
Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Thomas Zimmermann <tzimmermann@suse.de>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Depends on the first patch in the series.
---
drivers/video/fbdev/clps711x-fb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/fbdev/clps711x-fb.c b/drivers/video/fbdev/clps711x-fb.c
index dcfd1fbbc7e1..6171a98a48fd 100644
--- a/drivers/video/fbdev/clps711x-fb.c
+++ b/drivers/video/fbdev/clps711x-fb.c
@@ -197,7 +197,7 @@ static int clps711x_lcd_set_power(struct lcd_device *lcddev, int blank)
return 0;
}
-static struct lcd_ops clps711x_lcd_ops = {
+static const struct lcd_ops clps711x_lcd_ops = {
.check_fb = clps711x_lcd_check_fb,
.get_power = clps711x_lcd_get_power,
.set_power = clps711x_lcd_set_power,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 15/19] HID: picoLCD: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Bruno Prémont <bonbons@linux-vserver.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
Depends on the first patch in the series.
---
drivers/hid/hid-picolcd_lcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/hid/hid-picolcd_lcd.c b/drivers/hid/hid-picolcd_lcd.c
index 0c4b76de8ae5..061a33ba7b1d 100644
--- a/drivers/hid/hid-picolcd_lcd.c
+++ b/drivers/hid/hid-picolcd_lcd.c
@@ -46,7 +46,7 @@ static int picolcd_check_lcd_fb(struct lcd_device *ldev, struct fb_info *fb)
return fb && fb == picolcd_fbinfo((struct picolcd_data *)lcd_get_data(ldev));
}
-static struct lcd_ops picolcd_lcdops = {
+static const struct lcd_ops picolcd_lcdops = {
.get_contrast = picolcd_get_contrast,
.set_contrast = picolcd_set_contrast,
.check_fb = picolcd_check_lcd_fb,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 14/19] backlight: tdo24m: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/tdo24m.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/tdo24m.c b/drivers/video/backlight/tdo24m.c
index fc6fbaf85594..c413b3c68e95 100644
--- a/drivers/video/backlight/tdo24m.c
+++ b/drivers/video/backlight/tdo24m.c
@@ -322,7 +322,7 @@ static int tdo24m_set_mode(struct lcd_device *ld, struct fb_videomode *m)
return lcd->adj_mode(lcd, mode);
}
-static struct lcd_ops tdo24m_ops = {
+static const struct lcd_ops tdo24m_ops = {
.get_power = tdo24m_get_power,
.set_power = tdo24m_set_power,
.set_mode = tdo24m_set_mode,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 13/19] backlight: platform_lcd: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/platform_lcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/platform_lcd.c b/drivers/video/backlight/platform_lcd.c
index dc37494baf42..76872f5c34c5 100644
--- a/drivers/video/backlight/platform_lcd.c
+++ b/drivers/video/backlight/platform_lcd.c
@@ -62,7 +62,7 @@ static int platform_lcd_match(struct lcd_device *lcd, struct fb_info *info)
return plcd->us->parent == info->device;
}
-static struct lcd_ops platform_lcd_ops = {
+static const struct lcd_ops platform_lcd_ops = {
.get_power = platform_lcd_get_power,
.set_power = platform_lcd_set_power,
.check_fb = platform_lcd_match,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 12/19] backlight: otm3225a: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/otm3225a.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/otm3225a.c b/drivers/video/backlight/otm3225a.c
index 4568020abf3c..efe52fa08b07 100644
--- a/drivers/video/backlight/otm3225a.c
+++ b/drivers/video/backlight/otm3225a.c
@@ -205,7 +205,7 @@ static int otm3225a_get_power(struct lcd_device *ld)
return dd->power;
}
-static struct lcd_ops otm3225a_ops = {
+static const struct lcd_ops otm3225a_ops = {
.set_power = otm3225a_set_power,
.get_power = otm3225a_get_power,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 11/19] backlight: ltv350qv: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/ltv350qv.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/ltv350qv.c b/drivers/video/backlight/ltv350qv.c
index d54f501e4285..cdc4c087f230 100644
--- a/drivers/video/backlight/ltv350qv.c
+++ b/drivers/video/backlight/ltv350qv.c
@@ -217,7 +217,7 @@ static int ltv350qv_get_power(struct lcd_device *ld)
return lcd->power;
}
-static struct lcd_ops ltv_ops = {
+static const struct lcd_ops ltv_ops = {
.get_power = ltv350qv_get_power,
.set_power = ltv350qv_set_power,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 10/19] backlight: lms501kf03: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/lms501kf03.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/lms501kf03.c b/drivers/video/backlight/lms501kf03.c
index 5c46df8022bf..8aebe0af3391 100644
--- a/drivers/video/backlight/lms501kf03.c
+++ b/drivers/video/backlight/lms501kf03.c
@@ -304,7 +304,7 @@ static int lms501kf03_set_power(struct lcd_device *ld, int power)
return lms501kf03_power(lcd, power);
}
-static struct lcd_ops lms501kf03_lcd_ops = {
+static const struct lcd_ops lms501kf03_lcd_ops = {
.get_power = lms501kf03_get_power,
.set_power = lms501kf03_set_power,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 09/19] backlight: lms283gf05: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/lms283gf05.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/lms283gf05.c b/drivers/video/backlight/lms283gf05.c
index 36856962ed83..a65490e83d3d 100644
--- a/drivers/video/backlight/lms283gf05.c
+++ b/drivers/video/backlight/lms283gf05.c
@@ -139,7 +139,7 @@ static int lms283gf05_power_set(struct lcd_device *ld, int power)
return 0;
}
-static struct lcd_ops lms_ops = {
+static const struct lcd_ops lms_ops = {
.set_power = lms283gf05_power_set,
.get_power = NULL,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 08/19] backlight: l4f00242t03: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/l4f00242t03.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/l4f00242t03.c b/drivers/video/backlight/l4f00242t03.c
index bd5137ee203b..dd0874f8c7ff 100644
--- a/drivers/video/backlight/l4f00242t03.c
+++ b/drivers/video/backlight/l4f00242t03.c
@@ -158,7 +158,7 @@ static int l4f00242t03_lcd_power_set(struct lcd_device *ld, int power)
return 0;
}
-static struct lcd_ops l4f_ops = {
+static const struct lcd_ops l4f_ops = {
.set_power = l4f00242t03_lcd_power_set,
.get_power = l4f00242t03_lcd_power_get,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 07/19] backlight: jornada720_lcd: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/jornada720_lcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/jornada720_lcd.c b/drivers/video/backlight/jornada720_lcd.c
index 6796a7c2db25..5c64fa61e810 100644
--- a/drivers/video/backlight/jornada720_lcd.c
+++ b/drivers/video/backlight/jornada720_lcd.c
@@ -81,7 +81,7 @@ static int jornada_lcd_set_power(struct lcd_device *ld, int power)
return 0;
}
-static struct lcd_ops jornada_lcd_props = {
+static const struct lcd_ops jornada_lcd_props = {
.get_contrast = jornada_lcd_get_contrast,
.set_contrast = jornada_lcd_set_contrast,
.get_power = jornada_lcd_get_power,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 06/19] backlight: ili9320: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/ili9320.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/ili9320.c b/drivers/video/backlight/ili9320.c
index 2acd2708f8ca..3e318d1891b6 100644
--- a/drivers/video/backlight/ili9320.c
+++ b/drivers/video/backlight/ili9320.c
@@ -161,7 +161,7 @@ static int ili9320_get_power(struct lcd_device *ld)
return lcd->power;
}
-static struct lcd_ops ili9320_ops = {
+static const struct lcd_ops ili9320_ops = {
.get_power = ili9320_get_power,
.set_power = ili9320_set_power,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 05/19] backlight: ili922x: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/ili922x.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/ili922x.c b/drivers/video/backlight/ili922x.c
index c8e0e655dc86..7683e209ad6b 100644
--- a/drivers/video/backlight/ili922x.c
+++ b/drivers/video/backlight/ili922x.c
@@ -472,7 +472,7 @@ static int ili922x_get_power(struct lcd_device *ld)
return ili->power;
}
-static struct lcd_ops ili922x_ops = {
+static const struct lcd_ops ili922x_ops = {
.get_power = ili922x_get_power,
.set_power = ili922x_set_power,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 04/19] backlight: hx8357: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/hx8357.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/hx8357.c b/drivers/video/backlight/hx8357.c
index 339d9128fbde..cdd7b7686723 100644
--- a/drivers/video/backlight/hx8357.c
+++ b/drivers/video/backlight/hx8357.c
@@ -559,7 +559,7 @@ static int hx8357_get_power(struct lcd_device *lcdev)
return lcd->state;
}
-static struct lcd_ops hx8357_ops = {
+static const struct lcd_ops hx8357_ops = {
.set_power = hx8357_set_power,
.get_power = hx8357_get_power,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 03/19] backlight: corgi_lcd: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/corgi_lcd.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/corgi_lcd.c b/drivers/video/backlight/corgi_lcd.c
index dd765098ad98..aad1680c9075 100644
--- a/drivers/video/backlight/corgi_lcd.c
+++ b/drivers/video/backlight/corgi_lcd.c
@@ -380,7 +380,7 @@ static int corgi_lcd_get_power(struct lcd_device *ld)
return lcd->power;
}
-static struct lcd_ops corgi_lcd_ops = {
+static const struct lcd_ops corgi_lcd_ops = {
.get_power = corgi_lcd_get_power,
.set_power = corgi_lcd_set_power,
.set_mode = corgi_lcd_set_mode,
--
2.43.0
^ permalink raw reply related
* [PATCH v2 02/19] backlight: ams369fg06: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' is not modified by core backlight code, so it can be
made const for increased code safety.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/ams369fg06.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/video/backlight/ams369fg06.c b/drivers/video/backlight/ams369fg06.c
index 522dd81110b8..57ec205d2bd2 100644
--- a/drivers/video/backlight/ams369fg06.c
+++ b/drivers/video/backlight/ams369fg06.c
@@ -427,7 +427,7 @@ static int ams369fg06_set_brightness(struct backlight_device *bd)
return ret;
}
-static struct lcd_ops ams369fg06_lcd_ops = {
+static const struct lcd_ops ams369fg06_lcd_ops = {
.get_power = ams369fg06_get_power,
.set_power = ams369fg06_set_power,
};
--
2.43.0
^ permalink raw reply related
* [PATCH v2 01/19] backlight: Constify lcd_ops
From: Krzysztof Kozlowski @ 2024-04-24 6:33 UTC (permalink / raw)
To: Lee Jones, Daniel Thompson, Jingoo Han, Helge Deller,
Bruno Prémont, Jiri Kosina, Benjamin Tissoires,
Alexander Shiyan, Sascha Hauer, Pengutronix Kernel Team,
Shawn Guo, Fabio Estevam
Cc: dri-devel, linux-fbdev, linux-kernel, linux-input,
linux-arm-kernel, imx, linux-omap, Krzysztof Kozlowski
In-Reply-To: <20240424-video-backlight-lcd-ops-v2-0-1aaa82b07bc6@kernel.org>
'struct lcd_ops' passed in lcd_device_register() is not modified by core
backlight code, so it can be made const for code safety. This allows
drivers to also define the structure as const.
Reviewed-by: Daniel Thompson <daniel.thompson@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzk@kernel.org>
---
drivers/video/backlight/lcd.c | 4 ++--
include/linux/lcd.h | 6 +++---
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/video/backlight/lcd.c b/drivers/video/backlight/lcd.c
index ba4771cbd781..ceec90ca758b 100644
--- a/drivers/video/backlight/lcd.c
+++ b/drivers/video/backlight/lcd.c
@@ -191,7 +191,7 @@ static const struct class lcd_class = {
* or a pointer to the newly allocated device.
*/
struct lcd_device *lcd_device_register(const char *name, struct device *parent,
- void *devdata, struct lcd_ops *ops)
+ void *devdata, const struct lcd_ops *ops)
{
struct lcd_device *new_ld;
int rc;
@@ -279,7 +279,7 @@ static int devm_lcd_device_match(struct device *dev, void *res, void *data)
*/
struct lcd_device *devm_lcd_device_register(struct device *dev,
const char *name, struct device *parent,
- void *devdata, struct lcd_ops *ops)
+ void *devdata, const struct lcd_ops *ops)
{
struct lcd_device **ptr, *lcd;
diff --git a/include/linux/lcd.h b/include/linux/lcd.h
index 238fb1dfed98..68703a51dc53 100644
--- a/include/linux/lcd.h
+++ b/include/linux/lcd.h
@@ -61,7 +61,7 @@ struct lcd_device {
points to something in the body of that driver, it is also invalid. */
struct mutex ops_lock;
/* If this is NULL, the backing module is unloaded */
- struct lcd_ops *ops;
+ const struct lcd_ops *ops;
/* Serialise access to set_power method */
struct mutex update_lock;
/* The framebuffer notifier block */
@@ -102,10 +102,10 @@ static inline void lcd_set_power(struct lcd_device *ld, int power)
}
extern struct lcd_device *lcd_device_register(const char *name,
- struct device *parent, void *devdata, struct lcd_ops *ops);
+ struct device *parent, void *devdata, const struct lcd_ops *ops);
extern struct lcd_device *devm_lcd_device_register(struct device *dev,
const char *name, struct device *parent,
- void *devdata, struct lcd_ops *ops);
+ void *devdata, const struct lcd_ops *ops);
extern void lcd_device_unregister(struct lcd_device *ld);
extern void devm_lcd_device_unregister(struct device *dev,
struct lcd_device *ld);
--
2.43.0
^ permalink raw reply related
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox