* [PATCH v4 3/3] Input: atmel_mxt_ts: Document optional voltage regulators
From: Paweł Chmiel @ 2018-12-07 14:28 UTC (permalink / raw)
To: nick
Cc: dmitry.torokhov, robh+dt, mark.rutland, nicolas.ferre,
alexandre.belloni, linux-input, devicetree, linux-arm-kernel,
linux-kernel, Paweł Chmiel
In-Reply-To: <20181207142857.15818-1-pawel.mikolaj.chmiel@gmail.com>
Document new optional voltage regulators, which can be used
to power down/up touchscreen.
Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
Changes from v1:
- Added reviewed-by
---
.../devicetree/bindings/input/atmel,maxtouch.txt | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
index c88919480d37..17930ecadad3 100644
--- a/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
+++ b/Documentation/devicetree/bindings/input/atmel,maxtouch.txt
@@ -31,6 +31,12 @@ Optional properties for main touchpad device:
- reset-gpios: GPIO specifier for the touchscreen's reset pin (active low)
+- avdd-supply: Analog power supply. It powers up the analog channel block
+ of the controller to detect the touches.
+
+- vdd-supply: Digital power supply. It powers up the digital block
+ of the controller to enable i2c communication.
+
Example:
touch@4b {
@@ -38,4 +44,6 @@ Example:
reg = <0x4b>;
interrupt-parent = <&gpio>;
interrupts = <TEGRA_GPIO(W, 3) IRQ_TYPE_LEVEL_LOW>;
+ avdd-supply = <&atsp_reg>;
+ vdd-supply = <&tsp_reg>;
};
--
2.17.1
^ permalink raw reply related
* Re: [PATCH v3 0/8] HID: MS and Logitech high-resolution scroll wheel support
From: Benjamin Tissoires @ 2018-12-07 16:18 UTC (permalink / raw)
To: hcutts
Cc: Peter Hutterer, open list:HID CORE LAYER, Dmitry Torokhov,
Jiri Kosina, Linus Torvalds, Nestor Lopez Casado, lkml
In-Reply-To: <CA+jURcugFhSt9GGRZELQUCnupOf2Ns96Ao5ZruWfVtq=z_7ytw@mail.gmail.com>
On Wed, Dec 5, 2018 at 10:57 PM Harry Cutts <hcutts@chromium.org> wrote:
>
> On Tue, 4 Dec 2018 at 16:42, Peter Hutterer <peter.hutterer@who-t.net> wrote:
> >
> > A full explanation of why and what is in the v1, v2 patch thread here:
> > https://lkml.org/lkml/2018/11/22/625
> >
> > v3 adds a better commit messages, m560 REL_HWHEEL_HI_RES support and a patch
> > moved in the ordering. This is a full patch sequence because Benjamin's
> > magic scripts struggle with singular updates ;)
>
> I've retested with the same Logitech mice as before, except for the MX
> Anywhere 2S, which is currently not available to me. So, for
> reference, that's the MX Master 2S, Performance MX, M560, Anywhere MX,
> and the M325 (to check low-resolution scrolling).
>
> Verified-by: Harry Cutts <hcutts@chromium.org>
Thanks everybody, especially Peter for respinning and re-writing the
series, and writing the tests in hid-tools.
I was a little bit afraid when I checked `libinput debug-gui` as the
low res cursor was not moving if I were to scroll back and forth of
just one notch. However, checking debug-events of a non high-res aware
libinput showed that the low res wheel events were correctly emitted.
So I guess this is a debug-gui issue.
I have now queued this for 4.21. I do hope this will be smoother this time.
Cheers,
Benjamin
^ permalink raw reply
* Re: [PATCH v3 3/4] iio: adc: add STMPE ADC devicetree bindings
From: Jonathan Cameron @ 2018-12-08 10:55 UTC (permalink / raw)
To: Philippe Schenker
Cc: marcel.ziswiler, stefan, Max Krummenacher, devicetree, linux-iio,
Hartmut Knaack, Alexandre Torgue, linux-input, linux-kernel,
Rob Herring, Dmitry Torokhov, Lee Jones, Maxime Coquelin,
Mark Rutland, Peter Meerwald-Stadler, linux-stm32,
linux-arm-kernel, Lars-Peter Clausen
In-Reply-To: <08da9873dd9b20512a7fce01399c9d778e0ea652.camel@pschenker.ch>
On Thu, 06 Dec 2018 16:49:33 +0100
Philippe Schenker <dev@pschenker.ch> wrote:
> On Sun, 2018-11-25 at 10:04 +0000, Jonathan Cameron wrote:
> > On Fri, 23 Nov 2018 15:24:10 +0100
> > Philippe Schenker <dev@pschenker.ch> wrote:
> >
> > > From: Stefan Agner <stefan@agner.ch>
> > >
> > > This adds the devicetree bindings for the STMPE ADC.
> > >
> > > Signed-off-by: Stefan Agner <stefan@agner.ch>
> > > Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> > > Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
> > Clearly this will need review from input and mfd.
> >
> > I've suggested inline that you split the realignment out to a
> > separate patch for reviewability reasons.
>
> Thank you again Jonathan for your feedback, and of course also all the others!
>
> I will split it much more so everything will be much more readable in v4. You
> suggested again, to use the naming 'adc {'. I know that this is standard naming,
> but unfortunately, this naming is given by drivers/mfd/stmpe.c (line 1311).
> What do you suggest to do? break the naming scheme in mfd, or just use
> 'stmpe_adc {' ?
Leave it as it is, but add a note ideally to say that is the reason.
Jonathan
>
> >
> > > ---
> > >
> > > Changes in v3:
> > > - Reformatted documentation for touchscreen to use tabs and have a better
> > > overview of the settings.
> > > - Added note which adc-settings will take precedence.
> > > - changed typo in sample-time setting from 144 clocks to 124 clocks, as
> > > stated
> > > in the datasheet.
> > >
> > > Changes in v2:
> > > - Moved the bindings for ADC to the overlying mfd.
> > > - Reformatted for better readability
> > >
> > > .../devicetree/bindings/iio/adc/stmpe-adc.txt | 21 +++++++
> > > .../bindings/input/touchscreen/stmpe.txt | 60 ++++++++++++-------
> > > .../devicetree/bindings/mfd/stmpe.txt | 28 ++++++---
> > > 3 files changed, 80 insertions(+), 29 deletions(-)
> > > create mode 100644 Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt
> > >
> > > diff --git a/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt
> > > b/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt
> > > new file mode 100644
> > > index 000000000000..480e66422625
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/iio/adc/stmpe-adc.txt
> > > @@ -0,0 +1,21 @@
> > > +STMPE ADC driver
> > > +----------------
> > > +
> > > +Required properties:
> > > + - compatible: "st,stmpe-adc"
> > > +
> > > +Optional properties:
> > > +Note that the ADC is shared with the STMPE touchscreen. ADC related
> > > settings
> > > +have to be done in the mfd.
> > > +- st,norequest-mask: bitmask specifying which ADC channels should _not_ be
> > > + requestable due to different usage (e.g. touch)
> > > +
> > > +Node name must be stmpe_adc and should be child node of stmpe node to
> > > +which it belongs.
> > > +
> > > +Example:
> > > +
> > > + stmpe_adc {
> >
> > Can we use adc { here to match standard naming?
> >
> > > + compatible = "st,stmpe-adc";
> > > + st,norequest-mask = <0x0F>; /* dont use ADC CH3-0 */
> > > + };
> > > diff --git a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > index 127baa31a77a..414586513a02 100644
> > > --- a/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > +++ b/Documentation/devicetree/bindings/input/touchscreen/stmpe.txt
> > > @@ -5,36 +5,52 @@ Required properties:
> > > - compatible: "st,stmpe-ts"
> > >
> > > Optional properties:
> > > -- st,sample-time: ADC converstion time in number of clock. (0 -> 36
> > > clocks, 1 ->
> > > - 44 clocks, 2 -> 56 clocks, 3 -> 64 clocks, 4 -> 80 clocks, 5 -> 96
> > > clocks, 6
> > > - -> 144 clocks), recommended is 4.
> > > -- st,mod-12b: ADC Bit mode (0 -> 10bit ADC, 1 -> 12bit ADC)
> > > -- st,ref-sel: ADC reference source (0 -> internal reference, 1 -> external
> > > - reference)
> > > -- st,adc-freq: ADC Clock speed (0 -> 1.625 MHz, 1 -> 3.25 MHz, 2 || 3 ->
> > > 6.5 MHz)
> > > -- st,ave-ctrl: Sample average control (0 -> 1 sample, 1 -> 2 samples, 2 ->
> > > 4
> > > - samples, 3 -> 8 samples)
> > > -- st,touch-det-delay: Touch detect interrupt delay (0 -> 10 us, 1 -> 50 us,
> > > 2 ->
> > > - 100 us, 3 -> 500 us, 4-> 1 ms, 5 -> 5 ms, 6 -> 10 ms, 7 -> 50 ms)
> > > recommended
> > > - is 3
> > > -- st,settling: Panel driver settling time (0 -> 10 us, 1 -> 100 us, 2 ->
> > > 500 us, 3
> > > - -> 1 ms, 4 -> 5 ms, 5 -> 10 ms, 6 for 50 ms, 7 -> 100 ms) recommended is
> > > 2
> > > -- st,fraction-z: Length of the fractional part in z (fraction-z ([0..7]) =
> > > Count of
> > > - the fractional part) recommended is 7
> > > -- st,i-drive: current limit value of the touchscreen drivers (0 -> 20 mA
> > > typical 35
> > > - mA max, 1 -> 50 mA typical 80 mA max)
> > > +- st,ave-ctrl : Sample average control
> > > + 0 -> 1 sample
> > > + 1 -> 2 samples
> > > + 2 -> 4 samples
> > > + 3 -> 8 samples
> > > +- st,touch-det-delay : Touch detect interrupt delay (recommended is
> > > 3)
> > > + 0 -> 10 us 5 -> 5 ms
> > > + 1 -> 50 us 6 -> 10 ms
> > > + 2 -> 100 us 7 -> 50 ms
> > > + 3 -> 500 us
> > > + 4-> 1 ms
> > > +- st,settling : Panel driver settling time (recommended is 2)
> > > + 0 -> 10 us 5 -> 10 ms
> > > + 1 -> 100 us 6 for 50 ms
> > > + 2 -> 500 us 7 -> 100 ms
> > > + 3 -> 1 ms
> > > + 4 -> 5 ms
> > > +- st,fraction-z : Length of the fractional part in z
> > > (recommended is 7)
> > > + (fraction-z ([0..7]) = Count of the fractional part)
> > > +- st,i-drive : current limit value of the touchscreen drivers
> > > + 0 -> 20 mA (typical 35mA max)
> > > + 1 -> 50 mA (typical 80 mA max)
> > > +
> > > +Optional properties common with MFD (deprecated):
> > > + - st,sample-time : ADC conversion time in number of clock.
> > > + 0 -> 36 clocks 4 -> 80 clocks
> > > (recommended)
> > > + 1 -> 44 clocks 5 -> 96 clocks
> > > + 2 -> 56 clocks 6 -> 124 clocks
> > > + 3 -> 64 clocks
> > > + - st,mod-12b : ADC Bit mode
> > > + 0 -> 10bit ADC 1 -> 12bit ADC
> > > + - st,ref-sel : ADC reference source
> > > + 0 -> internal 1 -> external
> > > + - st,adc-freq : ADC Clock speed
> > > + 0 -> 1.625 MHz 2 || 3 -> 6.5 MHz
> > > + 1 -> 3.25 MHz
> > >
> > > Node name must be stmpe_touchscreen and should be child node of stmpe node
> > > to
> > > which it belongs.
> > >
> > > +Note that common ADC settings of stmpe_touchscreen will take precedence.
> > > +
> > > Example:
> > >
> > > stmpe_touchscreen {
> > > compatible = "st,stmpe-ts";
> > > - st,sample-time = <4>;
> > > - st,mod-12b = <1>;
> > > - st,ref-sel = <0>;
> > > - st,adc-freq = <1>;
> > > st,ave-ctrl = <1>;
> > > st,touch-det-delay = <2>;
> > > st,settling = <2>;
> > > diff --git a/Documentation/devicetree/bindings/mfd/stmpe.txt
> > > b/Documentation/devicetree/bindings/mfd/stmpe.txt
> > > index c797c05cd3c2..d4408a417193 100644
> > > --- a/Documentation/devicetree/bindings/mfd/stmpe.txt
> > > +++ b/Documentation/devicetree/bindings/mfd/stmpe.txt
> > > @@ -4,15 +4,29 @@ STMPE is an MFD device which may expose the following
> > > inbuilt devices: gpio,
> > > keypad, touchscreen, adc, pwm, rotator.
> > >
> > > Required properties:
> > > - - compatible :
> > > "st,stmpe[610|801|811|1600|1601|2401|2403]"
> > > - - reg : I2C/SPI address of the device
> > > + - compatible :
> > > "st,stmpe[610|801|811|1600|1601|2401|2403]"
> > > + - reg : I2C/SPI address of the device
> >
> > Nothing wrong with correcting alignment, but it shouldn't be in the same patch
> > as a fundamental change lie this. Just adds noise.
> >
> > If that means you first have to introduce the new block missaligned, then
> > fix up the alignment in a follow up patch, then do that as we can then
> > effectively ignore the realignment as obviously correct and focus on
> > the real changes.
> >
> > >
> > > Optional properties:
> > > - - interrupts : The interrupt outputs from the controller
> > > - - interrupt-controller : Marks the device node as an interrupt
> > > controller
> > > - - wakeup-source : Marks the input device as wakable
> > > - - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64, 128,
> > > 256, 512 and 1024
> > > - - irq-gpio : If present, which GPIO to use for event
> > > IRQ
> > > + - interrupts : The interrupt outputs from the
> > > controller
> > > + - interrupt-controller : Marks the device node as an interrupt
> > > controller
> > > + - wakeup-source : Marks the input device as wakable
> > > + - st,autosleep-timeout : Valid entries (ms); 4, 16, 32, 64,
> > > 128, 256, 512 and 1024
> > > + - irq-gpio : If present, which GPIO to use for
> > > event IRQ
> > > +
> > > +Optional properties for devices with touch and ADC (STMPE811|STMPE610):
> > > + - st,sample-time : ADC conversion time in number of clock.
> > > + 0 -> 36 clocks 4 -> 80
> > > clocks (recommended)
> > > + 1 -> 44 clocks 5 -> 96
> > > clocks
> > > + 2 -> 56 clocks 6 -> 124
> > > clocks
> > > + 3 -> 64 clocks
> > > + - st,mod-12b : ADC Bit mode
> > > + 0 -> 10bit ADC 1 -> 12bit
> > > ADC
> > > + - st,ref-sel : ADC reference source
> > > + 0 -> internal 1 ->
> > > external
> > > + - st,adc-freq : ADC Clock speed
> > > + 0 -> 1.625 MHz 2 || 3 ->
> > > 6.5 MHz
> > > + 1 -> 3.25 MHz
> > >
> > > Example:
> > >
>
^ permalink raw reply
* [PATCH RESEND] Input: synaptics - enable RMI on ThinkPad T560
From: Yussuf Khalil @ 2018-12-08 21:44 UTC (permalink / raw)
To: dmitry.torokhov
Cc: benjamin.tissoires, teika, linux-input, linux-kernel,
Yussuf Khalil
Before commit 7fd6d98b89f3 ("i2c: i801: Allow ACPI AML access I/O
ports not reserved for SMBus"), enabling RMI on the T560 would cause
the touchpad to stop working after resuming from suspend. Now that
this issue is fixed, RMI can be enabled safely and works fine.
Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
Signed-off-by: Yussuf Khalil <dev@pp3345.net>
---
Originally sent this patch in August. Resending because it has a
merge conflict with v4.20-rc5.
---
drivers/input/mouse/synaptics.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
index 2bd5bb11c8ba..7bdf8fc2c3b5 100644
--- a/drivers/input/mouse/synaptics.c
+++ b/drivers/input/mouse/synaptics.c
@@ -171,6 +171,7 @@ static const char * const smbus_pnp_ids[] = {
"LEN0046", /* X250 */
"LEN004a", /* W541 */
"LEN005b", /* P50 */
+ "LEN005e", /* T560 */
"LEN0071", /* T480 */
"LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
"LEN0073", /* X1 Carbon G5 (Elantech) */
--
2.19.2
^ permalink raw reply related
* Re: [PATCH RESEND] Input: synaptics - enable RMI on ThinkPad T560
From: Dmitry Torokhov @ 2018-12-09 4:13 UTC (permalink / raw)
To: Yussuf Khalil; +Cc: benjamin.tissoires, teika, linux-input, linux-kernel
In-Reply-To: <20181208214426.6628-1-dev@pp3345.net>
On Sat, Dec 08, 2018 at 10:44:26PM +0100, Yussuf Khalil wrote:
> Before commit 7fd6d98b89f3 ("i2c: i801: Allow ACPI AML access I/O
> ports not reserved for SMBus"), enabling RMI on the T560 would cause
> the touchpad to stop working after resuming from suspend. Now that
> this issue is fixed, RMI can be enabled safely and works fine.
>
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> Signed-off-by: Yussuf Khalil <dev@pp3345.net>
Applied, thank you.
> ---
> Originally sent this patch in August. Resending because it has a
> merge conflict with v4.20-rc5.
> ---
> drivers/input/mouse/synaptics.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/input/mouse/synaptics.c b/drivers/input/mouse/synaptics.c
> index 2bd5bb11c8ba..7bdf8fc2c3b5 100644
> --- a/drivers/input/mouse/synaptics.c
> +++ b/drivers/input/mouse/synaptics.c
> @@ -171,6 +171,7 @@ static const char * const smbus_pnp_ids[] = {
> "LEN0046", /* X250 */
> "LEN004a", /* W541 */
> "LEN005b", /* P50 */
> + "LEN005e", /* T560 */
> "LEN0071", /* T480 */
> "LEN0072", /* X1 Carbon Gen 5 (2017) - Elan/ALPS trackpoint */
> "LEN0073", /* X1 Carbon G5 (Elantech) */
> --
> 2.19.2
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH 1/8] Input: tm2-touchkey: Add support for midas touchkey
From: Dmitry Torokhov @ 2018-12-09 4:22 UTC (permalink / raw)
To: Paweł Chmiel
Cc: robh+dt, mark.rutland, devicetree, linux-input, linux-kernel,
xc-racer2, simon
In-Reply-To: <20181207105811.1831-2-pawel.mikolaj.chmiel@gmail.com>
Hi Paweł,
On Fri, Dec 07, 2018 at 11:58:04AM +0100, Paweł Chmiel wrote:
> From: Simon Shields <simon@lineageos.org>
>
> The touchkey on midas boards is almost identical.
> The only real difference is that it uses the same register for both
> keycode and base.
>
> Signed-off-by: Simon Shields <simon@lineageos.org>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
> drivers/input/keyboard/tm2-touchkey.c | 48 ++++++++++++++++++++++-----
> 1 file changed, 39 insertions(+), 9 deletions(-)
>
> diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c
> index abc266e40e17..37a5ced24009 100644
> --- a/drivers/input/keyboard/tm2-touchkey.c
> +++ b/drivers/input/keyboard/tm2-touchkey.c
> @@ -22,12 +22,13 @@
> #include <linux/leds.h>
> #include <linux/module.h>
> #include <linux/of.h>
> +#include <linux/of_device.h>
> #include <linux/pm.h>
> #include <linux/regulator/consumer.h>
>
> -#define TM2_TOUCHKEY_DEV_NAME "tm2-touchkey"
> -#define TM2_TOUCHKEY_KEYCODE_REG 0x03
> -#define TM2_TOUCHKEY_BASE_REG 0x00
> +#define TM2_TOUCHKEY_DEV_NAME "tm2-touchkey"
> +#define MIDAS_TOUCHKEY_DEV_NAME "midas-touchkey"
I am not sure why we need to bother with name changes... We can get to
compatible if it is that interesting, but other than that it seems
only complicate things. Also, you use MIDAS_TOUCHKEY_DEV_NAME in only
one place and open-code it in others.
> +
> #define TM2_TOUCHKEY_CMD_LED_ON 0x10
> #define TM2_TOUCHKEY_CMD_LED_OFF 0x20
> #define TM2_TOUCHKEY_BIT_PRESS_EV BIT(3)
> @@ -40,12 +41,31 @@ enum {
> TM2_TOUCHKEY_KEY_BACK,
> };
>
> +struct touchkey_variant {
> + const char *name;
> + u8 keycode_reg;
> + u8 base_reg;
> +};
> +
> struct tm2_touchkey_data {
> struct i2c_client *client;
> struct input_dev *input_dev;
> struct led_classdev led_dev;
> struct regulator *vdd;
> struct regulator_bulk_data regulators[2];
> + struct touchkey_variant *variant;
const struct touchkey_variant *variant;
> +};
> +
> +static struct touchkey_variant tm2_touchkey_variant = {
static const
> + .name = "tm2-touchkey",
> + .keycode_reg = 0x03,
> + .base_reg = 0x00,
> +};
> +
> +static struct touchkey_variant midas_touchkey_variant = {
static const
> + .name = "midas-touchkey",
> + .keycode_reg = 0x00,
> + .base_reg = 0x00,
> };
>
> static void tm2_touchkey_led_brightness_set(struct led_classdev *led_dev,
> @@ -66,7 +86,7 @@ static void tm2_touchkey_led_brightness_set(struct led_classdev *led_dev,
>
> regulator_set_voltage(touchkey->vdd, volt, volt);
> i2c_smbus_write_byte_data(touchkey->client,
> - TM2_TOUCHKEY_BASE_REG, data);
> + touchkey->variant->base_reg, data);
> }
>
> static int tm2_touchkey_power_enable(struct tm2_touchkey_data *touchkey)
> @@ -99,7 +119,7 @@ static irqreturn_t tm2_touchkey_irq_handler(int irq, void *devid)
> int key;
>
> data = i2c_smbus_read_byte_data(touchkey->client,
> - TM2_TOUCHKEY_KEYCODE_REG);
> + touchkey->variant->keycode_reg);
> if (data < 0) {
> dev_err(&touchkey->client->dev,
> "failed to read i2c data: %d\n", data);
> @@ -153,6 +173,9 @@ static int tm2_touchkey_probe(struct i2c_client *client,
> touchkey->client = client;
> i2c_set_clientdata(client, touchkey);
>
> + touchkey->variant = (struct touchkey_variant *)
Is cast really needed?
> + of_device_get_match_data(&client->dev);
> +
> touchkey->regulators[0].supply = "vcc";
> touchkey->regulators[1].supply = "vdd";
> error = devm_regulator_bulk_get(&client->dev,
> @@ -187,7 +210,7 @@ static int tm2_touchkey_probe(struct i2c_client *client,
> return -ENOMEM;
> }
>
> - touchkey->input_dev->name = TM2_TOUCHKEY_DEV_NAME;
> + touchkey->input_dev->name = touchkey->variant->name;
> touchkey->input_dev->id.bustype = BUS_I2C;
>
> input_set_capability(touchkey->input_dev, EV_KEY, KEY_PHONE);
> @@ -203,7 +226,7 @@ static int tm2_touchkey_probe(struct i2c_client *client,
> error = devm_request_threaded_irq(&client->dev, client->irq,
> NULL, tm2_touchkey_irq_handler,
> IRQF_ONESHOT,
> - TM2_TOUCHKEY_DEV_NAME, touchkey);
> + touchkey->variant->name, touchkey);
> if (error) {
> dev_err(&client->dev,
> "failed to request threaded irq: %d\n", error);
> @@ -211,7 +234,7 @@ static int tm2_touchkey_probe(struct i2c_client *client,
> }
>
> /* led device */
> - touchkey->led_dev.name = TM2_TOUCHKEY_DEV_NAME;
> + touchkey->led_dev.name = touchkey->variant->name;
> touchkey->led_dev.brightness = LED_FULL;
> touchkey->led_dev.max_brightness = LED_ON;
> touchkey->led_dev.brightness_set = tm2_touchkey_led_brightness_set;
> @@ -257,12 +280,19 @@ static SIMPLE_DEV_PM_OPS(tm2_touchkey_pm_ops,
>
> static const struct i2c_device_id tm2_touchkey_id_table[] = {
> { TM2_TOUCHKEY_DEV_NAME, 0 },
> + { MIDAS_TOUCHKEY_DEV_NAME, 0 },
> { },
> };
> MODULE_DEVICE_TABLE(i2c, tm2_touchkey_id_table);
>
> static const struct of_device_id tm2_touchkey_of_match[] = {
> - { .compatible = "cypress,tm2-touchkey", },
> + {
> + .compatible = "cypress,tm2-touchkey",
> + .data = &tm2_touchkey_variant,
> + }, {
> + .compatible = "cypress,midas-touchkey",
> + .data = &midas_touchkey_variant,
> + },
> { },
> };
> MODULE_DEVICE_TABLE(of, tm2_touchkey_of_match);
> --
> 2.17.1
>
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH 3/8] Input: tm2-touchkey: Use predefined device name
From: Dmitry Torokhov @ 2018-12-09 4:23 UTC (permalink / raw)
To: Paweł Chmiel
Cc: robh+dt, mark.rutland, devicetree, linux-input, linux-kernel,
xc-racer2, simon
In-Reply-To: <20181207105811.1831-4-pawel.mikolaj.chmiel@gmail.com>
On Fri, Dec 07, 2018 at 11:58:06AM +0100, Paweł Chmiel wrote:
> From: Jonathan Bakker <xc-racer2@live.ca>
>
> Purely a cosmetic fix, using the names defined earlier
If we decide to keep different names please fold into first patch.
>
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
> drivers/input/keyboard/tm2-touchkey.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/input/keyboard/tm2-touchkey.c b/drivers/input/keyboard/tm2-touchkey.c
> index 37a5ced24009..cc713b901bf2 100644
> --- a/drivers/input/keyboard/tm2-touchkey.c
> +++ b/drivers/input/keyboard/tm2-touchkey.c
> @@ -57,13 +57,13 @@ struct tm2_touchkey_data {
> };
>
> static struct touchkey_variant tm2_touchkey_variant = {
> - .name = "tm2-touchkey",
> + .name = TM2_TOUCHKEY_DEV_NAME,
> .keycode_reg = 0x03,
> .base_reg = 0x00,
> };
>
> static struct touchkey_variant midas_touchkey_variant = {
> - .name = "midas-touchkey",
> + .name = MIDAS_TOUCHKEY_DEV_NAME,
> .keycode_reg = 0x00,
> .base_reg = 0x00,
> };
> --
> 2.17.1
>
--
Dmitry
^ permalink raw reply
* Re: [PATCH v4 1/3] Input: atmel_mxt_ts: Add support for optional regulators
From: Dmitry Torokhov @ 2018-12-09 4:26 UTC (permalink / raw)
To: Paweł Chmiel
Cc: nick, robh+dt, mark.rutland, nicolas.ferre, alexandre.belloni,
linux-input, devicetree, linux-arm-kernel, linux-kernel
In-Reply-To: <20181207142857.15818-2-pawel.mikolaj.chmiel@gmail.com>
On Fri, Dec 07, 2018 at 03:28:55PM +0100, Paweł Chmiel wrote:
> This patch adds optional regulators, which can be used to power
> up touchscreen. After enabling regulators, we need to wait 150msec.
> This value is taken from official driver.
>
> It was tested on Samsung Galaxy i9000 (based on Samsung S5PV210 SOC).
>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
> Changes from v3:
> - Fix checkpatch issues
> - Drop sentence punctuation from subject of one of patches
>
> Changes from v2:
> - Move code enabling regulators into separate method,
> to make code more readable.
>
> Changes from v1:
> - Enable regulators only if reset_gpio is present.
> - Switch from devm_regulator_get_optional to devm_regulator_get
> ---
> drivers/input/touchscreen/atmel_mxt_ts.c | 65 +++++++++++++++++++++---
> 1 file changed, 59 insertions(+), 6 deletions(-)
>
> diff --git a/drivers/input/touchscreen/atmel_mxt_ts.c b/drivers/input/touchscreen/atmel_mxt_ts.c
> index d3aacd534e9c..1dc8ad0da5af 100644
> --- a/drivers/input/touchscreen/atmel_mxt_ts.c
> +++ b/drivers/input/touchscreen/atmel_mxt_ts.c
> @@ -27,6 +27,7 @@
> #include <linux/interrupt.h>
> #include <linux/of.h>
> #include <linux/property.h>
> +#include <linux/regulator/consumer.h>
> #include <linux/slab.h>
> #include <linux/gpio/consumer.h>
> #include <asm/unaligned.h>
> @@ -194,10 +195,10 @@ enum t100_type {
>
> /* Delay times */
> #define MXT_BACKUP_TIME 50 /* msec */
> -#define MXT_RESET_GPIO_TIME 20 /* msec */
> #define MXT_RESET_INVALID_CHG 100 /* msec */
> #define MXT_RESET_TIME 200 /* msec */
> #define MXT_RESET_TIMEOUT 3000 /* msec */
> +#define MXT_REGULATOR_DELAY 150 /* msec */
> #define MXT_CRC_TIMEOUT 1000 /* msec */
> #define MXT_FW_RESET_TIME 3000 /* msec */
> #define MXT_FW_CHG_TIMEOUT 300 /* msec */
> @@ -323,6 +324,8 @@ struct mxt_data {
> struct t7_config t7_cfg;
> struct mxt_dbg dbg;
> struct gpio_desc *reset_gpio;
> + struct regulator *vdd_reg;
> + struct regulator *avdd_reg;
>
> /* Cached parameters from object table */
> u16 T5_address;
> @@ -3038,6 +3041,38 @@ static const struct dmi_system_id chromebook_T9_suspend_dmi[] = {
> { }
> };
>
> +static int mxt_regulator_enable(struct mxt_data *data)
> +{
> + int error;
> +
> + if (data->reset_gpio) {
> + error = regulator_enable(data->vdd_reg);
> + if (error) {
> + dev_err(&data->client->dev,
> + "Failed to enable vdd regulator: %d\n", error);
> + return error;
> + }
> +
> + error = regulator_enable(data->avdd_reg);
> + if (error) {
> + dev_err(&data->client->dev,
> + "Failed to enable avdd regulator: %d\n", error);
This leaves vdd regulator enabled.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH RFC 1/2] input: add official Raspberry Pi's 7" touchscreen driver
From: Dmitry Torokhov @ 2018-12-09 4:43 UTC (permalink / raw)
To: Nicolas Saenz Julienne
Cc: Henrik Rydberg, linux-rpi-kernel, stefan.wahren, eric, agraf,
Corentin Labbe, Rob Herring, Hans de Goede, Masanari Iida, Zhu Yi,
Eugen Hristev, Jonathan Cameron, Hans-Christian Noren Egtvedt,
Heiko Schocher, linux-kernel, linux-input
In-Reply-To: <20181205220902.27682-2-nsaenzjulienne@suse.de>
Hi Nicolas,
On Wed, Dec 05, 2018 at 11:09:03PM +0100, Nicolas Saenz Julienne wrote:
> Adds support to Raspberry Pi's 7" touchscreen device. Instead of using
> a conventional bus all information is copied into a memory mapped area
> by RPi's VC4 firmware.
>
> Based on the driver found in RPi's downstream kernel repository.
>
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
> drivers/input/touchscreen/Kconfig | 12 +
> drivers/input/touchscreen/Makefile | 1 +
> drivers/input/touchscreen/raspberrypi-ts.c | 252 +++++++++++++++++++++
> 3 files changed, 265 insertions(+)
> create mode 100644 drivers/input/touchscreen/raspberrypi-ts.c
>
> diff --git a/drivers/input/touchscreen/Kconfig b/drivers/input/touchscreen/Kconfig
> index 2a80675cfd94..8d0fcb3dc8a8 100644
> --- a/drivers/input/touchscreen/Kconfig
> +++ b/drivers/input/touchscreen/Kconfig
> @@ -696,6 +696,18 @@ config TOUCHSCREEN_EDT_FT5X06
> To compile this driver as a module, choose M here: the
> module will be called edt-ft5x06.
>
> +config TOUCHSCREEN_RASPBERRYPI_TS
> + tristate "Raspberry Pi's firmware base touch screen support"
> + depends on OF
I think "depends on ASPBERRYPI_FIRMWARE || COMPILE_TEST" is more
precise dependency.
> + help
> + Say Y here if you have the official Raspberry Pi 7' touchscren
> + connected on your system.
> +
> + If unsure, say N.
> +
> + To compile this driver as a module, choose M here: the
> + module will be called raspberrypi-ts.
> +
> config TOUCHSCREEN_MIGOR
> tristate "Renesas MIGO-R touchscreen"
> depends on (SH_MIGOR || COMPILE_TEST) && I2C
> diff --git a/drivers/input/touchscreen/Makefile b/drivers/input/touchscreen/Makefile
> index 5911a4190cd2..3eccb1925e89 100644
> --- a/drivers/input/touchscreen/Makefile
> +++ b/drivers/input/touchscreen/Makefile
> @@ -109,3 +109,4 @@ obj-$(CONFIG_TOUCHSCREEN_ZET6223) += zet6223.o
> obj-$(CONFIG_TOUCHSCREEN_ZFORCE) += zforce_ts.o
> obj-$(CONFIG_TOUCHSCREEN_COLIBRI_VF50) += colibri-vf50-ts.o
> obj-$(CONFIG_TOUCHSCREEN_ROHM_BU21023) += rohm_bu21023.o
> +obj-$(CONFIG_TOUCHSCREEN_RASPBERRYPI_TS) += raspberrypi-ts.o
> diff --git a/drivers/input/touchscreen/raspberrypi-ts.c b/drivers/input/touchscreen/raspberrypi-ts.c
> new file mode 100644
> index 000000000000..9d29411a5674
> --- /dev/null
> +++ b/drivers/input/touchscreen/raspberrypi-ts.c
> @@ -0,0 +1,252 @@
> +/*
> + * Raspberry Pi 3 firmware based touchscreen driver
> + *
> + * Copyright (C) 2015, 2017 Raspberry Pi
> + * Copyright (C) 2018 Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License version 2 as
> + * published by the Free Software Foundation.
Please use SPDX tag for the license.
> + */
> +
> +#include <linux/io.h>
> +#include <linux/slab.h>
> +#include <linux/module.h>
> +#include <linux/bitops.h>
> +#include <linux/dma-mapping.h>
> +#include <linux/platform_device.h>
> +#include <linux/input.h>
> +#include <linux/input/mt.h>
> +#include <linux/input/touchscreen.h>
> +#include <soc/bcm2835/raspberrypi-firmware.h>
> +
> +#define RPI_TS_DEFAULT_WIDTH 800
> +#define RPI_TS_DEFAULT_HEIGHT 480
> +
> +#define RPI_TS_MAX_SUPPORTED_POINTS 10
> +
> +#define RPI_TS_FTS_TOUCH_DOWN 0
> +#define RPI_TS_FTS_TOUCH_CONTACT 2
> +
> +struct rpi_ts {
> + struct input_dev *input;
Since the only way is to poll, please use polled input device instead of
standard one. It will take care of scheduling polling, stopping it when
needed, etc.
> + struct touchscreen_properties prop;
> +
> + void __iomem *ts_base;
> + dma_addr_t bus_addr;
> +
> + struct delayed_work work;
> + int known_ids;
> +};
> +
> +struct rpi_ts_regs {
> + uint8_t device_mode;
> + uint8_t gesture_id;
> + uint8_t num_points;
Simply u8 in kernel.
> + struct rpi_ts_touch {
> + uint8_t xh;
> + uint8_t xl;
> + uint8_t yh;
> + uint8_t yl;
> + uint8_t pressure; /* Not supported */
> + uint8_t area; /* Not supported */
> + } point[RPI_TS_MAX_SUPPORTED_POINTS];
> +};
> +
> +/*
> + * This process polls the memory based register copy of the touch screen chip
> + * registers using the number of points register to know whether the copy has
> + * been updated (we write 99 to the memory copy, the GPU will write between 0 -
> + * 10 points)
> + */
> +static void rpi_ts_work(struct work_struct *work)
> +{
> + struct rpi_ts *ts = container_of(work, struct rpi_ts, work.work);
> + struct input_dev *input = ts->input;
> + struct rpi_ts_regs regs;
> + int modified_ids = 0;
> + int released_ids;
> + int event_type;
> + int touchid;
> + int x, y;
> + int i;
> +
> + memcpy_fromio(®s, ts->ts_base, sizeof(struct rpi_ts_regs));
> + iowrite8(99, ts->ts_base + offsetof(struct rpi_ts_regs, num_points));
> +
> + if (regs.num_points == 99 ||
> + (regs.num_points == 0 && ts->known_ids == 0))
> + goto out;
> +
> + for (i = 0; i < regs.num_points; i++) {
> + x = (((int)regs.point[i].xh & 0xf) << 8) + regs.point[i].xl;
> + y = (((int)regs.point[i].yh & 0xf) << 8) + regs.point[i].yl;
> + touchid = (regs.point[i].yh >> 4) & 0xf;
> + event_type = (regs.point[i].xh >> 6) & 0x03;
> +
> + modified_ids |= BIT(touchid);
> +
> + if (event_type == RPI_TS_FTS_TOUCH_DOWN ||
> + event_type == RPI_TS_FTS_TOUCH_CONTACT) {
> + input_mt_slot(input, touchid);
> + input_mt_report_slot_state(input, MT_TOOL_FINGER, 1);
> + touchscreen_report_pos(input, &ts->prop, x, y, true);
> + }
> + }
> +
> + released_ids = ts->known_ids & ~modified_ids;
> + for (i = 0; released_ids && i < RPI_TS_MAX_SUPPORTED_POINTS; i++) {
If you make released_ids long instead of int you can use
for_each_set_bit() here.
> + if (released_ids & BIT(i)) {
> + input_mt_slot(input, i);
> + input_mt_report_slot_state(input, MT_TOOL_FINGER, 0);
> + modified_ids &= ~(BIT(i));
> + }
> + }
> + ts->known_ids = modified_ids;
> +
> + input_mt_report_pointer_emulation(ts->input, true);
input_mt_sync_frame() and then you would not need to call
input_mt_report_pointer_emulation() if you passed right flags to
input_mt_init_slots().
> + input_sync(ts->input);
> +
> +out:
> + schedule_delayed_work(&ts->work, msecs_to_jiffies(17)); /* 60 fps */
> +}
> +
> +static int rpi_ts_open(struct input_dev *dev)
> +{
> + struct rpi_ts *ts = input_get_drvdata(dev);
> +
> + schedule_delayed_work(&ts->work, 0);
> +
> + return 0;
> +}
> +
> +static void rpi_ts_close(struct input_dev *dev)
> +{
> + struct rpi_ts *ts = input_get_drvdata(dev);
> +
> + cancel_delayed_work_sync(&ts->work);
> +}
Not needed if using polled input device.
> +
> +static int rpi_ts_probe(struct platform_device *pdev)
> +{
> + struct device *dev = &pdev->dev;
> + struct device_node *np = dev->of_node;
> + struct device_node *fw_node;
> + struct input_dev *input;
> + struct rpi_firmware *fw;
> + struct rpi_ts *ts;
> + u32 touchbuf;
> + int err = 0;
> +
> + fw_node = of_get_parent(np);
> + if (!fw_node) {
> + dev_err(dev, "Missing firmware node\n");
> + return -ENOENT;
> + }
> +
> + fw = rpi_firmware_get(fw_node);
You are leaking node here I believe. Stick of_node_put() after
rpi_firmware_get() and before "if".
> + if (!fw)
> + return -EPROBE_DEFER;
> +
> + ts = devm_kzalloc(dev, sizeof(struct rpi_ts), GFP_KERNEL);
sizeof(*ts)
> + if (!ts) {
> + dev_err(dev, "Failed to allocate memory\n");
> + return -ENOMEM;
> + }
> +
> + input = input_allocate_device();
devm.
> + if (!input) {
> + dev_err(dev, "Failed to allocate input device\n");
> + return -ENOMEM;
> + }
> + ts->input = input;
> +
> + ts->ts_base = dma_zalloc_coherent(dev, PAGE_SIZE, &ts->bus_addr,
> + GFP_KERNEL);
> + if (!ts->ts_base) {
> + dev_err(dev, "failed to dma_alloc_coherent\n");
> + err = -ENOMEM;
> + goto undegister_input_device;
> + }
> +
> + touchbuf = (u32)ts->bus_addr;
> + err = rpi_firmware_property(fw, RPI_FIRMWARE_FRAMEBUFFER_SET_TOUCHBUF,
> + &touchbuf, sizeof(touchbuf));
> +
> + if (err || touchbuf != 0) {
> + dev_warn(dev, "Failed to set touchbuf, trying to get err:%x\n",
> + err);
> + goto clean_dma_buf;
> + }
> +
> + INIT_DELAYED_WORK(&ts->work, rpi_ts_work);
> + platform_set_drvdata(pdev, ts);
> +
> + input->name = "raspberrypi-ts";
> + input->id.bustype = BUS_HOST;
> + input->open = rpi_ts_open;
> + input->close = rpi_ts_close;
> + input->dev.parent = &pdev->dev;
> +
> + __set_bit(EV_KEY, input->evbit);
> + __set_bit(EV_SYN, input->evbit);
> + __set_bit(EV_ABS, input->evbit);
> +
> + input_set_abs_params(input, ABS_MT_POSITION_X, 0,
> + RPI_TS_DEFAULT_WIDTH, 0, 0);
> + input_set_abs_params(input, ABS_MT_POSITION_Y, 0,
> + RPI_TS_DEFAULT_HEIGHT, 0, 0);
> + touchscreen_parse_properties(input, true, &ts->prop);
> +
> + input_mt_init_slots(input, RPI_TS_MAX_SUPPORTED_POINTS,
> + INPUT_MT_DIRECT);
> +
> + input_set_drvdata(input, ts);
> +
> + err = input_register_device(input);
> + if (err) {
> + dev_err(dev, "could not register input device, %d\n",
> + err);
> + goto clean_dma_buf;
> + }
> + return 0;
> +
> +clean_dma_buf:
> + dma_free_coherent(dev, PAGE_SIZE, ts->ts_base, ts->bus_addr);
I wild make freeing this area a devm custom action
(devm_add_action_or_reset). Then you can get rid of rpi_ts_remove().
> +undegister_input_device:
> + input_unregister_device(ts->input);
> +
> + return err;
> +}
> +
> +static int rpi_ts_remove(struct platform_device *pdev)
> +{
> + struct rpi_ts *ts = (struct rpi_ts *)platform_get_drvdata(pdev);
> +
> + input_unregister_device(ts->input);
> + dma_free_coherent(&pdev->dev, PAGE_SIZE, ts->ts_base, ts->bus_addr);
> + return 0;
> +}
> +
> +static const struct of_device_id rpi_ts_match[] = {
> + { .compatible = "raspberrypi,firmware-ts", },
> + {},
> +};
> +MODULE_DEVICE_TABLE(of, rpi_ts_match);
> +
> +static struct platform_driver rpi_ts_driver = {
> + .driver = {
> + .name = "raspberrypi-ts",
> + .owner = THIS_MODULE,
I am pretty sure we no longer need to set owner explicitly.
> + .of_match_table = rpi_ts_match,
> + },
> + .probe = rpi_ts_probe,
> + .remove = rpi_ts_remove,
> +};
> +
> +module_platform_driver(rpi_ts_driver);
> +
> +MODULE_AUTHOR("Gordon Hollingworth");
> +MODULE_AUTHOR("Nicolas Saenz Julienne <nsaenzjulienne@suse.de>");
> +MODULE_DESCRIPTION("Raspberry Pi 3 firmware based touchscreen driver");
> +MODULE_LICENSE("GPL");
This should be "GPL v2" to math the license notice at the top of the
file.
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH v3 1/4] mfd: stmpe: Move ADC related defines to header of mfd
From: Dmitry Torokhov @ 2018-12-09 4:52 UTC (permalink / raw)
To: Lee Jones
Cc: Philippe Schenker, jic23, marcel.ziswiler, stefan,
Philippe Schenker, Max Krummenacher, Alexandre Torgue,
linux-kernel, linux-input, Maxime Coquelin, linux-stm32,
linux-arm-kernel
In-Reply-To: <20181128091532.GU4272@dell>
On Wed, Nov 28, 2018 at 09:15:32AM +0000, Lee Jones wrote:
> On Fri, 23 Nov 2018, Philippe Schenker wrote:
>
> > Move defines that are ADC related to the header of the overlying mfd,
> > so they can be used from multiple sub-devices.
> >
> > Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
> > ---
> >
> > Changes in v3:
> > - None
> >
> > Changes in v2:
> > - This is a new added commit. Separate commit for moving the defines out of
> > drivers/input/touchscreen/stmpe-ts.c to overlying mfd-device drivers/mfd/stmpe.c
> > - Pre-fix defines with STMPE_
> >
> > drivers/input/touchscreen/stmpe-ts.c | 34 +++++++++++-----------------
> > include/linux/mfd/stmpe.h | 11 +++++++++
>
> Acked-by: Lee Jones <lee.jones@linaro.org>
The series seem to be heading towards MFD or IIO, so I assume this patch
will be merged through one of these trees.
Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
Thanks.
--
Dmitry
^ permalink raw reply
* Re: [PATCH 6/8] Input: dt-bindings: tm2-touchkey: Document new keycodes property
From: Dmitry Torokhov @ 2018-12-09 4:57 UTC (permalink / raw)
To: Paweł Chmiel
Cc: robh+dt, mark.rutland, devicetree, linux-input, linux-kernel,
xc-racer2, simon
In-Reply-To: <20181207105811.1831-7-pawel.mikolaj.chmiel@gmail.com>
On Fri, Dec 07, 2018 at 11:58:09AM +0100, Paweł Chmiel wrote:
> From: Jonathan Bakker <xc-racer2@live.ca>
>
> Document new optional property for setting custom keycodes.
>
> Signed-off-by: Jonathan Bakker <xc-racer2@live.ca>
> Signed-off-by: Paweł Chmiel <pawel.mikolaj.chmiel@gmail.com>
> ---
> .../devicetree/bindings/input/cypress,tm2-touchkey.txt | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt
> index dfb3b9f0ee40..3b54d997b8de 100644
> --- a/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt
> +++ b/Documentation/devicetree/bindings/input/cypress,tm2-touchkey.txt
> @@ -10,6 +10,9 @@ Required properties:
> - vcc-supply : internal regulator output. 1.8V
> - vdd-supply : power supply for IC 3.3V
>
> +Optional properties:
> +- keycodes: array of keycodes (max 4), default KEY_PHONE and KEY_BACK
> +
> [0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
>
> Example:
> @@ -23,5 +26,6 @@ Example:
> interrupts = <2 IRQ_TYPE_EDGE_FALLING>;
> vcc-supply=<&ldo32_reg>;
> vdd-supply=<&ldo33_reg>;
> + keycodes = /bits/ 8 <KEY_PHONE KEY_BACK>;
We definitely have key codes bigger than 255. Just keep them normal
ints please.
> };
> };
> --
> 2.17.1
>
--
Dmitry
^ permalink raw reply
* [PATCH v2] Input: i8042 fix refcount leak
From: Yangtao Li @ 2018-12-09 5:19 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Yangtao Li
use of_node_put() to release the refcount.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
drivers/input/serio/i8042-sparcio.h | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index 796289846204..cc6777b4c4ea 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -111,13 +111,17 @@ static int __init i8042_platform_init(void)
struct device_node *root = of_find_node_by_path("/");
if (!strcmp(root->name, "SUNW,JavaStation-1")) {
+ of_node_put(root);
/* Hardcoded values for MrCoffee. */
i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
kbd_iobase = ioremap(0x71300060, 8);
if (!kbd_iobase)
return -ENODEV;
} else {
- int err = platform_driver_register(&sparc_i8042_driver);
+ int err;
+
+ of_node_put(root);
+ err = platform_driver_register(&sparc_i8042_driver);
if (err)
return err;
--
2.17.0
^ permalink raw reply related
* Re: [PATCH] Input: i8042 add of_node_put()
From: Frank Lee @ 2018-12-09 5:22 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
In-Reply-To: <20181129183657.GD54791@dtor-ws>
On Fri, Nov 30, 2018 at 2:37 AM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> Hi Yangtao,
>
> On Wed, Nov 21, 2018 at 09:35:13AM -0500, Yangtao Li wrote:
> > use of_node_put() to release the refcount.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > drivers/input/serio/i8042-sparcio.h | 24 +++++++++++++++++-------
> > 1 file changed, 17 insertions(+), 7 deletions(-)
> >
> > diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
> > index 796289846204..5495bc035518 100644
> > --- a/drivers/input/serio/i8042-sparcio.h
> > +++ b/drivers/input/serio/i8042-sparcio.h
> > @@ -108,18 +108,21 @@ static struct platform_driver sparc_i8042_driver = {
> >
> > static int __init i8042_platform_init(void)
> > {
> > + int rc;
> > struct device_node *root = of_find_node_by_path("/");
> >
> > if (!strcmp(root->name, "SUNW,JavaStation-1")) {
> > /* Hardcoded values for MrCoffee. */
> > i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
> > kbd_iobase = ioremap(0x71300060, 8);
> > - if (!kbd_iobase)
> > - return -ENODEV;
> > + if (!kbd_iobase){
> > + rc = -ENODEV;
> > + goto out;
> > + }
> > } else {
> > - int err = platform_driver_register(&sparc_i8042_driver);
> > - if (err)
> > - return err;
> > + rc = platform_driver_register(&sparc_i8042_driver);
> > + if (rc)
> > + goto out;
> >
> > if (i8042_kbd_irq == -1 ||
> > i8042_aux_irq == -1) {
> > @@ -127,13 +130,18 @@ static int __init i8042_platform_init(void)
> > of_iounmap(kbd_res, kbd_iobase, 8);
> > kbd_iobase = (void __iomem *) NULL;
> > }
> > - return -ENODEV;
> > + rc = -ENODEV;
> > + goto out;
> > }
> > }
> >
> > i8042_reset = I8042_RESET_ALWAYS;
> >
> > - return 0;
> > + rc = 0;
> > +out:
> > + of_node_put(root);
> > +
> > + return rc;
>
> Instead of rearranging code like this, can we instead have:
>
> static inline bool i8042_is_mr_coffee(void)
> {
> struct device_node *root;
> bool is_mr_coffree;
>
> root = of_find_node_by_path("/");
> is_mr_coffree = !strcmp(root->name, "SUNW,JavaStation-1");
> of_node_put(root);
>
> return is_mr_coffee;
> }
>
> ?
Yes, we should do this. The modified patch has been sent.
Also, I am very sorry to reply so late.
MBR,
Yangtao
>
> Thanks.
>
> --
> Dmitry
^ permalink raw reply
* Re: [PATCH] Input: sparcspkr add of_node_put()
From: Frank Lee @ 2018-12-09 5:23 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
In-Reply-To: <20181121132806.22521-1-tiny.windzz@gmail.com>
ping....
^ permalink raw reply
* Re: [PATCH v2] Input: i8042 fix refcount leak
From: Dmitry Torokhov @ 2018-12-09 5:40 UTC (permalink / raw)
To: Yangtao Li; +Cc: linux-input, linux-kernel
In-Reply-To: <20181209051900.19035-1-tiny.windzz@gmail.com>
On Sun, Dec 09, 2018 at 12:19:00AM -0500, Yangtao Li wrote:
> use of_node_put() to release the refcount.
>
> Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> ---
> drivers/input/serio/i8042-sparcio.h | 6 +++++-
> 1 file changed, 5 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
> index 796289846204..cc6777b4c4ea 100644
> --- a/drivers/input/serio/i8042-sparcio.h
> +++ b/drivers/input/serio/i8042-sparcio.h
> @@ -111,13 +111,17 @@ static int __init i8042_platform_init(void)
> struct device_node *root = of_find_node_by_path("/");
>
> if (!strcmp(root->name, "SUNW,JavaStation-1")) {
> + of_node_put(root);
> /* Hardcoded values for MrCoffee. */
> i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
> kbd_iobase = ioremap(0x71300060, 8);
> if (!kbd_iobase)
> return -ENODEV;
> } else {
> - int err = platform_driver_register(&sparc_i8042_driver);
> + int err;
> +
> + of_node_put(root);
> + err = platform_driver_register(&sparc_i8042_driver);
> if (err)
> return err;
This is not really what I asked for, as in this version you left out
leaky reference in i8042_platform_exit(). Please make the "detect Mr
Coffee" function and use it in both i8042_platform_init() and
i8042_platform_exit().
Thanks.
--
Dmitry
^ permalink raw reply
* [PATCH v3] Input: i8042 add i8042_is_mr_coffee() helper to avoid refconut leak
From: Yangtao Li @ 2018-12-09 6:14 UTC (permalink / raw)
To: dmitry.torokhov; +Cc: linux-input, linux-kernel, Yangtao Li
of_find_node_by_path() acquires a reference to the node returned by
it and that reference needs to be dropped by its caller. Add
i8042_is_mr_coffee() helper to avoid refconut leak.
Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
---
changes in v3:
-add i8042_is_mr_coffee
---
drivers/input/serio/i8042-sparcio.h | 20 ++++++++++++++++----
1 file changed, 16 insertions(+), 4 deletions(-)
diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
index 796289846204..c8dc5b4b5e4f 100644
--- a/drivers/input/serio/i8042-sparcio.h
+++ b/drivers/input/serio/i8042-sparcio.h
@@ -106,11 +106,23 @@ static struct platform_driver sparc_i8042_driver = {
.remove = sparc_i8042_remove,
};
+static inline bool i8042_is_mr_coffee(void)
+{
+ struct device_node *root;
+ bool is_mr_coffree;
+
+ root = of_find_node_by_path("/");
+ is_mr_coffree = !strcmp(root->name, "SUNW,JavaStation-1");
+ of_node_put(root);
+
+ return is_mr_coffee;
+}
+
static int __init i8042_platform_init(void)
{
- struct device_node *root = of_find_node_by_path("/");
+ bool match = i8042_is_mr_coffee();
- if (!strcmp(root->name, "SUNW,JavaStation-1")) {
+ if (match) {
/* Hardcoded values for MrCoffee. */
i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
kbd_iobase = ioremap(0x71300060, 8);
@@ -138,9 +150,9 @@ static int __init i8042_platform_init(void)
static inline void i8042_platform_exit(void)
{
- struct device_node *root = of_find_node_by_path("/");
+ bool match = i8042_is_mr_coffee();
- if (strcmp(root->name, "SUNW,JavaStation-1"))
+ if (!match)
platform_driver_unregister(&sparc_i8042_driver);
}
--
2.17.0
^ permalink raw reply related
* Re: [PATCH v2] Input: i8042 fix refcount leak
From: Frank Lee @ 2018-12-09 6:15 UTC (permalink / raw)
To: Dmitry Torokhov; +Cc: linux-input, linux-kernel
In-Reply-To: <20181209054014.GA237502@dtor-ws>
On Sun, Dec 9, 2018 at 1:40 PM Dmitry Torokhov
<dmitry.torokhov@gmail.com> wrote:
>
> On Sun, Dec 09, 2018 at 12:19:00AM -0500, Yangtao Li wrote:
> > use of_node_put() to release the refcount.
> >
> > Signed-off-by: Yangtao Li <tiny.windzz@gmail.com>
> > ---
> > drivers/input/serio/i8042-sparcio.h | 6 +++++-
> > 1 file changed, 5 insertions(+), 1 deletion(-)
> >
> > diff --git a/drivers/input/serio/i8042-sparcio.h b/drivers/input/serio/i8042-sparcio.h
> > index 796289846204..cc6777b4c4ea 100644
> > --- a/drivers/input/serio/i8042-sparcio.h
> > +++ b/drivers/input/serio/i8042-sparcio.h
> > @@ -111,13 +111,17 @@ static int __init i8042_platform_init(void)
> > struct device_node *root = of_find_node_by_path("/");
> >
> > if (!strcmp(root->name, "SUNW,JavaStation-1")) {
> > + of_node_put(root);
> > /* Hardcoded values for MrCoffee. */
> > i8042_kbd_irq = i8042_aux_irq = 13 | 0x20;
> > kbd_iobase = ioremap(0x71300060, 8);
> > if (!kbd_iobase)
> > return -ENODEV;
> > } else {
> > - int err = platform_driver_register(&sparc_i8042_driver);
> > + int err;
> > +
> > + of_node_put(root);
> > + err = platform_driver_register(&sparc_i8042_driver);
> > if (err)
> > return err;
>
> This is not really what I asked for, as in this version you left out
> leaky reference in i8042_platform_exit(). Please make the "detect Mr
> Coffee" function and use it in both i8042_platform_init() and
> i8042_platform_exit().
How about the newer?
Yours,
Yangtao
>
> Thanks.
>
> --
> Dmitry
^ permalink raw reply
* [PATCH -next] input: keyboard: remove duplicated include from mtk-pmic-keys.c
From: YueHaibing @ 2018-12-09 6:34 UTC (permalink / raw)
To: dmitry.torokhov, matthias.bgg, lee.jones, chen.zhong
Cc: linux-kernel, linux-mediatek, linux-arm-kernel, linux-input,
YueHaibing
Remove duplicated include.
Signed-off-by: YueHaibing <yuehaibing@huawei.com>
---
drivers/input/keyboard/mtk-pmic-keys.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
index 02c67a1..5027ebb 100644
--- a/drivers/input/keyboard/mtk-pmic-keys.c
+++ b/drivers/input/keyboard/mtk-pmic-keys.c
@@ -19,7 +19,6 @@
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/platform_device.h>
-#include <linux/kernel.h>
#include <linux/of.h>
#include <linux/of_device.h>
#include <linux/regmap.h>
--
2.7.0
^ permalink raw reply related
* Re: [PATCH 1/2] Input: omap-keypad: Fix keyboard debounce configuration
From: Pavel Machek @ 2018-12-09 11:56 UTC (permalink / raw)
To: Tony Lindgren
Cc: Dmitry Torokhov, linux-input, linux-kernel, linux-omap,
Axel Haslam, Felipe Balbi, Illia Smyrnov, Marcel Partap,
Merlijn Wajer, Michael Scott, NeKit, Sebastian Reichel
In-Reply-To: <20181203012933.6647-1-tony@atomide.com>
[-- Attachment #1: Type: text/plain, Size: 1797 bytes --]
On Sun 2018-12-02 17:29:32, Tony Lindgren wrote:
> I noticed that the Android v3.0.8 kernel on droid4 is using different
> keypad values from the mainline kernel and does not have issues with
> keys occasionally being stuck until pressed again. Turns out there was
> an earlier patch posted to fix this as "Input: omap-keypad: errata i689:
> Correct debounce time", but it was never reposted to fix use macros
> for timing calculations.
>
> This updated version is using macros, and also fixes the use of the
> input clock rate to use 32768KiHz instead of 32000KiHz. And we want to
> use the known good Android kernel values of 3 and 6 instead of 2 and 6
> in the earlier patch.
>
> Cc: Axel Haslam <axelhaslam@ti.com>
> Cc: Felipe Balbi <felipe.balbi@linux.intel.com>
> Cc: Illia Smyrnov <illia.smyrnov@ti.com>
> Cc: Marcel Partap <mpartap@gmx.net>
> Cc: Merlijn Wajer <merlijn@wizzup.org>
> Cc: Michael Scott <hashcode0f@gmail.com>
> Cc: NeKit <nekit1000@gmail.com>
> Cc: Pavel Machek <pavel@ucw.cz>
> Cc: Sebastian Reichel <sre@kernel.org>
> Reported-by: Pavel Machek <pavel@ucw.cz>
> Signed-off-by: Tony Lindgren <tony@atomide.com>
So, if I press key "." quickly on console in
4.18.0-rc4-88970-gf075a2c-dirty it starts repeating. I could reproduce
it 3 times from tree tries. Then I decided to test your patch, and so
I booted 4.20-rc5+ using kexec. Turns out, I can't reproduce that
repeat there... I tried more than 10 times. But that's before your
patch.
So -- bad news for you -- seems like someone -- maybe you -- already
fixed this. (But that does not mean the patch is bad idea).
Thanks,
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]
^ permalink raw reply
* Re: [PATCH] HID: intel-ish-hid: fixes incorrect error handling
From: Jiri Kosina @ 2018-12-09 20:45 UTC (permalink / raw)
To: Benjamin Tissoires
Cc: bianpan2016, Srinivas Pandruvada, open list:HID CORE LAYER, lkml
In-Reply-To: <CAO-hwJJDhtNqy6gc9OJ+rHnJimrQeAoxxkay5XnfXjxMtvEufQ@mail.gmail.com>
On Fri, 7 Dec 2018, Benjamin Tissoires wrote:
> > The memory chunk allocated by hid_allocate_device() should be released
> > by hid_destroy_device(), not kfree().
> >
> > Fixes: 0b28cb4bcb1("HID: intel-ish-hid: ISH HID client driver")
> > Signed-off-by: Pan Bian <bianpan2016@163.com>
> > ---
> > drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +-
> > 1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c b/drivers/hid/intel-ish-hid/ishtp-hid.c
> > index cd23903..e918d78 100644
> > --- a/drivers/hid/intel-ish-hid/ishtp-hid.c
> > +++ b/drivers/hid/intel-ish-hid/ishtp-hid.c
> > @@ -222,7 +222,7 @@ int ishtp_hid_probe(unsigned int cur_hid_dev,
> > err_hid_device:
> > kfree(hid_data);
> > err_hid_data:
> > - kfree(hid);
> > + hid_destroy_device(hid);
>
> Looks good to me. Srinivas, any comments?
> FWIW:
> Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
>
> Jiri, do you think we should send this one as 4.20/fixes material or
> wait for 4.21?
Given that this has been around since 4.9, I wouldn't be devastated if it
lands only in next merge window. So I'd just put it to 4.20/fixes and wait
for other more serious trigger for sending that to Linus eventually.
Thanks,
--
Jiri Kosina
SUSE Labs
^ permalink raw reply
* Re: [PATCH] HID: intel-ish-hid: fixes incorrect error handling
From: Srinivas Pandruvada @ 2018-12-10 3:20 UTC (permalink / raw)
To: Jiri Kosina, Benjamin Tissoires
Cc: bianpan2016, open list:HID CORE LAYER, lkml
In-Reply-To: <nycvar.YFH.7.76.1812092144440.17216@cbobk.fhfr.pm>
On Sun, 2018-12-09 at 21:45 +0100, Jiri Kosina wrote:
> On Fri, 7 Dec 2018, Benjamin Tissoires wrote:
>
> > > The memory chunk allocated by hid_allocate_device() should be
> > > released
> > > by hid_destroy_device(), not kfree().
> > >
> > > Fixes: 0b28cb4bcb1("HID: intel-ish-hid: ISH HID client driver")
> > > Signed-off-by: Pan Bian <bianpan2016@163.com>
> > > ---
> > > drivers/hid/intel-ish-hid/ishtp-hid.c | 2 +-
> > > 1 file changed, 1 insertion(+), 1 deletion(-)
> > >
> > > diff --git a/drivers/hid/intel-ish-hid/ishtp-hid.c
> > > b/drivers/hid/intel-ish-hid/ishtp-hid.c
> > > index cd23903..e918d78 100644
> > > --- a/drivers/hid/intel-ish-hid/ishtp-hid.c
> > > +++ b/drivers/hid/intel-ish-hid/ishtp-hid.c
> > > @@ -222,7 +222,7 @@ int ishtp_hid_probe(unsigned int cur_hid_dev,
> > > err_hid_device:
> > > kfree(hid_data);
> > > err_hid_data:
> > > - kfree(hid);
> > > + hid_destroy_device(hid);
> >
> > Looks good to me. Srinivas, any comments?
> > FWIW:
> > Reviewed-by: Benjamin Tissoires <benjamin.tissoires@redhat.com>
> >
> > Jiri, do you think we should send this one as 4.20/fixes material
> > or
> > wait for 4.21?
>
> Given that this has been around since 4.9, I wouldn't be devastated
> if it
> lands only in next merge window. So I'd just put it to 4.20/fixes and
> wait
> for other more serious trigger for sending that to Linus eventually.
>
Agree.
Thanks,
Srinivas
> Thanks,
>
^ permalink raw reply
* Re: [PATCH -next] input: keyboard: remove duplicated include from mtk-pmic-keys.c
From: Lee Jones @ 2018-12-10 6:15 UTC (permalink / raw)
To: YueHaibing
Cc: dmitry.torokhov, matthias.bgg, chen.zhong, linux-kernel,
linux-mediatek, linux-arm-kernel, linux-input
In-Reply-To: <20181209063440.27820-1-yuehaibing@huawei.com>
On Sun, 09 Dec 2018, YueHaibing wrote:
> Remove duplicated include.
>
> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> ---
> drivers/input/keyboard/mtk-pmic-keys.c | 1 -
> 1 file changed, 1 deletion(-)
>
> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> index 02c67a1..5027ebb 100644
> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> @@ -19,7 +19,6 @@
> #include <linux/input.h>
> #include <linux/interrupt.h>
> #include <linux/platform_device.h>
> -#include <linux/kernel.h>
> #include <linux/of.h>
> #include <linux/of_device.h>
> #include <linux/regmap.h>
You are removing the wrong one.
Please convert this patch's main intent to alphabetise the header
files. Then you can remove any obvious duplicates.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* Re: [PATCH v3 1/4] mfd: stmpe: Move ADC related defines to header of mfd
From: Lee Jones @ 2018-12-10 6:16 UTC (permalink / raw)
To: Dmitry Torokhov
Cc: Philippe Schenker, jic23, marcel.ziswiler, stefan,
Philippe Schenker, Max Krummenacher, Alexandre Torgue,
linux-kernel, linux-input, Maxime Coquelin, linux-stm32,
linux-arm-kernel
In-Reply-To: <20181209045241.GF211094@dtor-ws>
On Sat, 08 Dec 2018, Dmitry Torokhov wrote:
> On Wed, Nov 28, 2018 at 09:15:32AM +0000, Lee Jones wrote:
> > On Fri, 23 Nov 2018, Philippe Schenker wrote:
> >
> > > Move defines that are ADC related to the header of the overlying mfd,
> > > so they can be used from multiple sub-devices.
> > >
> > > Signed-off-by: Philippe Schenker <philippe.schenker@toradex.com>
> > > ---
> > >
> > > Changes in v3:
> > > - None
> > >
> > > Changes in v2:
> > > - This is a new added commit. Separate commit for moving the defines out of
> > > drivers/input/touchscreen/stmpe-ts.c to overlying mfd-device drivers/mfd/stmpe.c
> > > - Pre-fix defines with STMPE_
> > >
> > > drivers/input/touchscreen/stmpe-ts.c | 34 +++++++++++-----------------
> > > include/linux/mfd/stmpe.h | 11 +++++++++
> >
> > Acked-by: Lee Jones <lee.jones@linaro.org>
>
> The series seem to be heading towards MFD or IIO, so I assume this patch
> will be merged through one of these trees.
>
> Acked-by: Dmitry Torokhov <dmitry.torokhov@gmail.com>
I'd be happy to take it.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
* Re: [PATCH -next] input: keyboard: remove duplicated include from mtk-pmic-keys.c
From: YueHaibing @ 2018-12-10 7:16 UTC (permalink / raw)
To: Lee Jones
Cc: dmitry.torokhov, matthias.bgg, chen.zhong, linux-kernel,
linux-mediatek, linux-arm-kernel, linux-input
In-Reply-To: <20181210061557.GL26661@dell>
On 2018/12/10 14:15, Lee Jones wrote:
> On Sun, 09 Dec 2018, YueHaibing wrote:
>
>> Remove duplicated include.
>>
>> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
>> ---
>> drivers/input/keyboard/mtk-pmic-keys.c | 1 -
>> 1 file changed, 1 deletion(-)
>>
>> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
>> index 02c67a1..5027ebb 100644
>> --- a/drivers/input/keyboard/mtk-pmic-keys.c
>> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
>> @@ -19,7 +19,6 @@
>> #include <linux/input.h>
>> #include <linux/interrupt.h>
>> #include <linux/platform_device.h>
>> -#include <linux/kernel.h>
>> #include <linux/of.h>
>> #include <linux/of_device.h>
>> #include <linux/regmap.h>
>
> You are removing the wrong one.
No, linux/kernel.h is a duplicated include indeed.
>
> Please convert this patch's main intent to alphabetise the header
> files. Then you can remove any obvious duplicates.
I can alphabetize it in v2 if need be.
>
^ permalink raw reply
* Re: [PATCH -next] input: keyboard: remove duplicated include from mtk-pmic-keys.c
From: Lee Jones @ 2018-12-10 10:07 UTC (permalink / raw)
To: YueHaibing
Cc: dmitry.torokhov, matthias.bgg, chen.zhong, linux-kernel,
linux-mediatek, linux-arm-kernel, linux-input
In-Reply-To: <4f1a67e5-b735-f8bd-88b8-3a1ca590eba2@huawei.com>
On Mon, 10 Dec 2018, YueHaibing wrote:
> On 2018/12/10 14:15, Lee Jones wrote:
> > On Sun, 09 Dec 2018, YueHaibing wrote:
> >
> >> Remove duplicated include.
> >>
> >> Signed-off-by: YueHaibing <yuehaibing@huawei.com>
> >> ---
> >> drivers/input/keyboard/mtk-pmic-keys.c | 1 -
> >> 1 file changed, 1 deletion(-)
> >>
> >> diff --git a/drivers/input/keyboard/mtk-pmic-keys.c b/drivers/input/keyboard/mtk-pmic-keys.c
> >> index 02c67a1..5027ebb 100644
> >> --- a/drivers/input/keyboard/mtk-pmic-keys.c
> >> +++ b/drivers/input/keyboard/mtk-pmic-keys.c
> >> @@ -19,7 +19,6 @@
> >> #include <linux/input.h>
> >> #include <linux/interrupt.h>
> >> #include <linux/platform_device.h>
> >> -#include <linux/kernel.h>
> >> #include <linux/of.h>
> >> #include <linux/of_device.h>
> >> #include <linux/regmap.h>
> >
> > You are removing the wrong one.
>
> No, linux/kernel.h is a duplicated include indeed.
Actually both are not correct, but the first instance (at the top) is
even more incorrect.
> > Please convert this patch's main intent to alphabetise the header
> > files. Then you can remove any obvious duplicates.
>
> I can alphabetize it in v2 if need be.
Yes please.
--
Lee Jones [李琼斯]
Linaro Services Technical Lead
Linaro.org │ Open source software for ARM SoCs
Follow Linaro: Facebook | Twitter | Blog
^ permalink raw reply
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