Linux Input/HID development
 help / color / mirror / Atom feed
* Re: [PATCH 01/17] ARM: sunxi: Register cpufreq-dt for sun[45678]i
From: Maxime Ripard @ 2015-01-06 15:55 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm
In-Reply-To: <1420511727-8242-2-git-send-email-wens@csie.org>

[-- Attachment #1: Type: text/plain, Size: 622 bytes --]

Hi,

On Tue, Jan 06, 2015 at 10:35:11AM +0800, Chen-Yu Tsai wrote:
> On sun[45678]i, we have one cluster of identical cores sharing a
> clock, which is ideal for using cpufreq-dt. Register a platform
> device for cpufreq-dt.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

While I don't have anything against this patch, I seem to recall that
it was not necessary anymore, or that there was some work in the
direction of removing that kind of code, have you looked into that?

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH 02/17] clk: sunxi: Propagate rate changes to parent for mux clocks
From: Maxime Ripard @ 2015-01-06 16:00 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm
In-Reply-To: <1420511727-8242-3-git-send-email-wens@csie.org>

[-- Attachment #1: Type: text/plain, Size: 640 bytes --]

On Tue, Jan 06, 2015 at 10:35:12AM +0800, Chen-Yu Tsai wrote:
> The cpu clock on sunxi machines is just a mux clock, which is normally
> fed by the main PLL, but can be muxed to the main or low power oscillator.
> 
> Make the mux clock propagate rate changes to its parent, so we can
> change the clock rate of the PLL, and thus actually implement rate
> changing on the cpu clock.
> 
> This patch also removes the no reparenting limit.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH 06/17] ARM: dts: sun7i: Add cpu clock reference and operating points to dtsi
From: Maxime Ripard @ 2015-01-06 16:07 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm
In-Reply-To: <1420511727-8242-7-git-send-email-wens@csie.org>

[-- Attachment #1: Type: text/plain, Size: 580 bytes --]

On Tue, Jan 06, 2015 at 10:35:16AM +0800, Chen-Yu Tsai wrote:
> The cpu core is clocked from the "cpu" clock. Add a reference to it
> in the first cpu node. Also add "cpu0" label to the node.
> 
> The operating points were taken from the A20 FEX files in the
> sunxi-boards repository. Not all boards have the same settings. The
> settings in this patch are the most generic ones.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH 08/17] ARM: dts: sun7i: cubieboard2: add axp209 regulator nodes
From: Maxime Ripard @ 2015-01-06 16:11 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm
In-Reply-To: <1420511727-8242-9-git-send-email-wens@csie.org>

[-- Attachment #1: Type: text/plain, Size: 2259 bytes --]

Hi,

On Tue, Jan 06, 2015 at 10:35:18AM +0800, Chen-Yu Tsai wrote:
> This patch adds the regulator nodes for the axp209 by including
> the axp209 dtsi. As the inputs of these regulators are from the
> axp209's PS output, which is basically just a mux over the 2
> inputs, it is considered to be unregulated. Thus we do not provide
> input supply properties for them.
> 
> The regulator names and constraints are based on the board
> schematics and the SoC datasheet.
> 
> DCDC2 is used as the cpu power supply. This patch also references
> it from the cpu node.
> 
> Also get rid of axp209 properties already set in axp209.dtsi.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
> ---
>  arch/arm/boot/dts/axp209.dtsi               |  4 ++++
>  arch/arm/boot/dts/sun7i-a20-cubieboard2.dts | 35 +++++++++++++++++++++++++----
>  2 files changed, 35 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
> index 3c38cbafe285..fec3364b2110 100644
> --- a/arch/arm/boot/dts/axp209.dtsi
> +++ b/arch/arm/boot/dts/axp209.dtsi
> @@ -54,6 +54,10 @@
>   */
>  
>  &axp209 {
> +	compatible = "x-powers,axp209";
> +	interrupt-controller;
> +	#interrupt-cells = <1>;
> +

This should be in your patch adding the AXP DTSI.

>  	regulators {
>  		/* Default work frequency for buck regulators */
>  		x-powers,dcdc-freq = <1500>;
> diff --git a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> index 53680983461a..61e61c0eb829 100644
> --- a/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> +++ b/arch/arm/boot/dts/sun7i-a20-cubieboard2.dts
> @@ -84,13 +84,9 @@
>  			status = "okay";
>  
>  			axp209: pmic@34 {
> -				compatible = "x-powers,axp209";
>  				reg = <0x34>;
>  				interrupt-parent = <&nmi_intc>;
>  				interrupts = <0 8>;
> -
> -				interrupt-controller;
> -				#interrupt-cells = <1>;
>  			};
>  		};
>  
> @@ -141,3 +137,34 @@
>  		status = "okay";
>  	};
>  };
> +
> +/include/ "axp209.dtsi"

We've switched to preprocessor includes, please use them instead.

Thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH 16/17] ARM: sunxi_defconfig: Enable TOUCHSCREEN_SUN4I, CPUFREQ_DT, CPU_THERMAL
From: Maxime Ripard @ 2015-01-06 16:13 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm
In-Reply-To: <1420511727-8242-17-git-send-email-wens@csie.org>

[-- Attachment #1: Type: text/plain, Size: 414 bytes --]

On Tue, Jan 06, 2015 at 10:35:26AM +0800, Chen-Yu Tsai wrote:
> This patch enables TOUCHSCREEN_SUN4I, CPUFREQ_DT, and CPU_THERMAL to
> enable cpufreq support with passive cpu cooling (thermal throttling)
> by default.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH 17/17] ARM: multi_v7_defconfig: Enable TOUCHSCREEN_SUN4I, CPU_THERMAL
From: Maxime Ripard @ 2015-01-06 16:12 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input, linux-arm-kernel, linux-pm
In-Reply-To: <1420511727-8242-18-git-send-email-wens@csie.org>

[-- Attachment #1: Type: text/plain, Size: 407 bytes --]

On Tue, Jan 06, 2015 at 10:35:27AM +0800, Chen-Yu Tsai wrote:
> This patch enables TOUCHSCREEN_SUN4I and CPU_THERMAL to enable cpufreq
> support with passive cpu cooling (thermal throttling) on sunxi by default.
> 
> Signed-off-by: Chen-Yu Tsai <wens@csie.org>

Applied, thanks!
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH v8 5/6] ARM: sunxi: Add AXP20x support in defconfig
From: Maxime Ripard @ 2015-01-06 16:33 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Lee Jones, Mark Brown, Dmitry Torokhov,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Carlo Caione,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1419303194-3075-6-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

On Tue, Dec 23, 2014 at 10:53:13AM +0800, Chen-Yu Tsai wrote:
> From: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
> 
> Signed-off-by: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply

* Re: [PATCH v8 6/6] ARM: sunxi: Add AXP20x support multi_v7_defconfig
From: Maxime Ripard @ 2015-01-06 16:34 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Lee Jones, Mark Brown, Dmitry Torokhov,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Carlo Caione,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	linux-input-u79uwXL29TY76Z2rM5mHXA,
	linux-doc-u79uwXL29TY76Z2rM5mHXA
In-Reply-To: <1419303194-3075-7-git-send-email-wens-jdAy2FN1RRM@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 411 bytes --]

On Tue, Dec 23, 2014 at 10:53:14AM +0800, Chen-Yu Tsai wrote:
> From: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
> 
> Signed-off-by: Carlo Caione <carlo-KA+7E9HrN00dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Chen-Yu Tsai <wens-jdAy2FN1RRM@public.gmane.org>

Applied, thanks!

Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply

* Re: [PATCH 1/5] mfd: tps65218: make INT[12] and STATUS registers volatile
From: Felipe Balbi @ 2015-01-06 17:37 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Tony Lindgren, Dmitry Torokhov, Samuel Ortiz, Lee Jones,
	Linux OMAP Mailing List, linux-input-u79uwXL29TY76Z2rM5mHXA,
	devicetree-u79uwXL29TY76Z2rM5mHXA, Linux ARM Kernel Mailing List,
	stable-u79uwXL29TY76Z2rM5mHXA, Keerthy
In-Reply-To: <1419622104-25812-2-git-send-email-balbi-l0cyMroinI0@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 1835 bytes --]

On Fri, Dec 26, 2014 at 01:28:20PM -0600, Felipe Balbi wrote:
> STATUS register can be modified by the HW, so we
> should bypass cache because of that.
> 
> In the case of INT[12] registers, they are the ones
> that actually clear the IRQ source at the time they
> are read. If we rely on the cache for them, we will
> never be able to clear the interrupt, which will cause
> our IRQ line to be disabled due to IRQ throttling.
> 
> Fixes: 44b4dc6 mfd: tps65218: Add driver for the TPS65218 PMIC
> Cc: <stable-u79uwXL29TY76Z2rM5mHXA@public.gmane.org> # v3.15+
> Cc: Keerthy <j-keerthy-l0cyMroinI0@public.gmane.org>
> Cc: Lee Jones <lee.jones-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Signed-off-by: Felipe Balbi <balbi-l0cyMroinI0@public.gmane.org>

ping

> ---
>  drivers/mfd/tps65218.c | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
> index 0d256cb..2243f75 100644
> --- a/drivers/mfd/tps65218.c
> +++ b/drivers/mfd/tps65218.c
> @@ -125,10 +125,21 @@ int tps65218_clear_bits(struct tps65218 *tps, unsigned int reg,
>  }
>  EXPORT_SYMBOL_GPL(tps65218_clear_bits);
>  
> +static const struct regmap_range tps65218_yes_ranges[] = {
> +	regmap_reg_range(TPS65218_REG_INT1, TPS65218_REG_INT2),
> +	regmap_reg_range(TPS65218_REG_STATUS, TPS65218_REG_STATUS),
> +};
> +
> +static const struct regmap_access_table tps65218_volatile_table = {
> +	.yes_ranges = tps65218_yes_ranges,
> +	.n_yes_ranges = ARRAY_SIZE(tps65218_yes_ranges),
> +};
> +
>  static struct regmap_config tps65218_regmap_config = {
>  	.reg_bits = 8,
>  	.val_bits = 8,
>  	.cache_type = REGCACHE_RBTREE,
> +	.volatile_table = &tps65218_volatile_table,
>  };
>  
>  static const struct regmap_irq tps65218_irqs[] = {
> -- 
> 2.2.0
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* Re: [PATCH 2/5] mfd: tps65218: make INT1 our status_base register
From: Felipe Balbi @ 2015-01-06 17:37 UTC (permalink / raw)
  To: Felipe Balbi
  Cc: Tony Lindgren, Dmitry Torokhov, Samuel Ortiz, Lee Jones,
	Linux OMAP Mailing List, linux-input, devicetree,
	Linux ARM Kernel Mailing List, stable, Keerthy
In-Reply-To: <1419622104-25812-3-git-send-email-balbi@ti.com>

[-- Attachment #1: Type: text/plain, Size: 985 bytes --]

On Fri, Dec 26, 2014 at 01:28:21PM -0600, Felipe Balbi wrote:
> If we don't tell regmap-irq that our first status
> register is at offset 1, it will try to read offset
> zero, which is the chipid register.
> 
> Fixes: 44b4dc6 mfd: tps65218: Add driver for the TPS65218 PMIC
> Cc: <stable@vger.kernel.org> # v3.15+
> Cc: Keerthy <j-keerthy@ti.com>
> Cc: Lee Jones <lee.jones@linaro.org>
> Signed-off-by: Felipe Balbi <balbi@ti.com>

ping

> ---
>  drivers/mfd/tps65218.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/mfd/tps65218.c b/drivers/mfd/tps65218.c
> index 2243f75..d6b7643 100644
> --- a/drivers/mfd/tps65218.c
> +++ b/drivers/mfd/tps65218.c
> @@ -204,6 +204,7 @@ static struct regmap_irq_chip tps65218_irq_chip = {
>  
>  	.num_regs = 2,
>  	.mask_base = TPS65218_REG_INT_MASK1,
> +	.status_base = TPS65218_REG_INT1,
>  };
>  
>  static const struct of_device_id of_tps65218_match_table[] = {
> -- 
> 2.2.0
> 

-- 
balbi

[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]

^ permalink raw reply

* RE: hid-replay captured data
From: josep.sanchez.ferreres @ 2015-01-06 18:13 UTC (permalink / raw)
  To: linux-input; +Cc: benjamin.tissoires, pinglinux, killertofu, skomra

Here's the data you asked for:

D: 0
R: 117 06 0d ff 09 01 a1 01 85 10 a1 00 06 00 ff 09 01 15 00 26 ff 00  
75 08 95 3f 81 02 c0 09 01 85 11 95 3f b1 02 09 01 85 02 95 01 b1 02  
09 01 85 cc 95 02 b1 02 09 01 85 b0 95 01 b1 02 09 01 85 b1 95 28 81  
02 09 01 85 07 95 06 b1 02 09 01 85 08 95 04 b1 02 09 01 85 0a 95 01  
b1 02 09 01 85 0b 95 01 b1 02 09 01 85 0c 95 01 b1 02 09 01 85 0d 95  
3f 81 02 c0
N: Wacom Co.,Ltd. Bamboo Pad, USB
P: usb-0000:00:1d.7-2.4.3/input0
I: 3 056a 0318

The three lines you told me are there.

PD: Sorry for not replying correctly. I can't use my gmail because the  
mail server from vger.kernel.org doesn't allow html mails, so I'm  
using my college e-mail address that's redirected to my gmail. So long  
story short I can't hit reply and have to do it manually, sorry for  
that. I've included everyone from the cc, is it ok now? If not please  
tell me and I'll try to avoid the mail redirection so I can reply  
properly.

^ permalink raw reply

* Re: [PATCH 04/17] ARM: dts: sunxi: Add dtsi for AXP209 PMIC
From: Chen-Yu Tsai @ 2015-01-06 19:09 UTC (permalink / raw)
  To: Maxime Ripard
  Cc: Dmitry Torokhov, Zhang Rui, Eduardo Valentin, Hans de Goede,
	linux-input@vger.kernel.org, linux-arm-kernel, linux-pm
In-Reply-To: <20150106155838.GS7853@lukather>

Hi,

On Tue, Jan 6, 2015 at 11:58 PM, Maxime Ripard
<maxime.ripard@free-electrons.com> wrote:
> Hi,
>
> On Tue, Jan 06, 2015 at 10:35:14AM +0800, Chen-Yu Tsai wrote:
>> The AXP209 PMIC is used with some Allwinner SoCs. This patch adds
>> a dtsi file listing all the regulator nodes. The regulators are
>> initialized based on their device node names.
>>
>> Signed-off-by: Chen-Yu Tsai <wens@csie.org>
>> ---
>>  arch/arm/boot/dts/axp209.dtsi | 87 +++++++++++++++++++++++++++++++++++++++++++
>>  1 file changed, 87 insertions(+)
>>  create mode 100644 arch/arm/boot/dts/axp209.dtsi
>>
>> diff --git a/arch/arm/boot/dts/axp209.dtsi b/arch/arm/boot/dts/axp209.dtsi
>> new file mode 100644
>> index 000000000000..3c38cbafe285
>> --- /dev/null
>> +++ b/arch/arm/boot/dts/axp209.dtsi
>> @@ -0,0 +1,87 @@
>> +/*
>> + * Copyright 2015 Chen-Yu Tsai
>> + *
>> + * Chen-Yu Tsai <wens@csie.org>
>> + *
>> + * This file is dual-licensed: you can use it either under the terms
>> + * of the GPL or the X11 license, at your option. Note that this dual
>> + * licensing only applies to this file, and not this project as a
>> + * whole.
>> + *
>> + *  a) This file is free software; you can redistribute it and/or
>> + *     modify it under the terms of the GNU General Public License as
>> + *     published by the Free Software Foundation; either version 2 of the
>> + *     License, or (at your option) any later version.
>> + *
>> + *     This file is distributed in the hope that it will be useful,
>> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + *     GNU General Public License for more details.
>> + *
>> + *     You should have received a copy of the GNU General Public
>> + *     License along with this file; if not, write to the Free
>> + *     Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
>> + *     MA 02110-1301 USA
>> + *
>> + * Or, alternatively,
>> + *
>> + *  b) Permission is hereby granted, free of charge, to any person
>> + *     obtaining a copy of this software and associated documentation
>> + *     files (the "Software"), to deal in the Software without
>> + *     restriction, including without limitation the rights to use,
>> + *     copy, modify, merge, publish, distribute, sublicense, and/or
>> + *     sell copies of the Software, and to permit persons to whom the
>> + *     Software is furnished to do so, subject to the following
>> + *     conditions:
>> + *
>> + *     The above copyright notice and this permission notice shall be
>> + *     included in all copies or substantial portions of the Software.
>> + *
>> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
>> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
>> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
>> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
>> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
>> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
>> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
>> + *     OTHER DEALINGS IN THE SOFTWARE.
>> + */
>> +
>> +/*
>> + * AXP202/209 Integrated Power Management Chip
>> + * http://www.x-powers.com/product/AXP20X.php
>> + * http://dl.linux-sunxi.org/AXP/AXP209%20Datasheet%20v1.0_cn.pdf
>> + */
>> +
>> +&axp209 {
>> +     regulators {
>> +             /* Default work frequency for buck regulators */
>> +             x-powers,dcdc-freq = <1500>;
>> +
>> +             /* This section lists all the regulators */
>
> I don't think this comment is necessary.
>
>> +             reg_dcdc2: dcdc2 {
>> +             };
>> +
>> +             reg_dcdc3: dcdc3 {
>> +             };
>> +
>> +             reg_ldo1: ldo1 {
>> +                     /* LDO1 is a fixed output regulator */
>> +                     regulator-always-on;
>> +                     regulator-min-microvolt = <1300000>;
>> +                     regulator-max-microvolt = <1300000>;
>> +             };
>> +
>> +             reg_ldo2: ldo2 {
>> +             };
>> +
>> +             reg_ldo3: ldo3 {
>> +             };
>> +
>> +             reg_ldo4: ldo4 {
>> +             };
>> +
>> +             reg_ldo5: ldo5 {
>> +             };
>
> Some default names for the regulator would be great!

Default names are already given through the regulator driver.
They are full uppercase names, like in the datasheet.

I could add lowercase names here for the default.

ChenYu

^ permalink raw reply

* Re: [PATCH] driver: input :touchscreen : add Raydium I2C touch driver
From: Jeremiah Mahler @ 2015-01-06 19:43 UTC (permalink / raw)
  To: jeffrey.lin
  Cc: dmitry.torokhov, rydberg, shc_work, charliemooney, bleung,
	lee.jones, jeffrey.lin, roger.yang, KP.li, linux-kernel,
	linux-input
In-Reply-To: <1420536350-5916-1-git-send-email-jeffrey.lin@rad-ic.com>

On Tue, Jan 06, 2015 at 05:25:50PM +0800, jeffrey.lin wrote:
> From: "jeffrey.lin" <jeffrey.lin@rad-ic.com>
> 
> This patch is porting Raydium I2C touch driver. Developer can enable
>  raydium touch driver by modifying define "CONFIG_TOUCHSCREEN_RM_TS".
> 
> Signed-off-by: jeffrey.lin@rad-ic.com

You need your full legal name in your Signed-off-by:

-- 
- Jeremiah Mahler

^ permalink raw reply

* Re: hid-replay captured data
From: Benjamin Tissoires @ 2015-01-06 20:39 UTC (permalink / raw)
  To: josep.sanchez.ferreres
  Cc: linux-input, Ping Cheng, Jason Gerecke, Aaron Skomra
In-Reply-To: <20150106191346.6zze9x2sg0coskkc@webmail.fib.upc.es>

On Tue, Jan 6, 2015 at 1:13 PM,  <josep.sanchez.ferreres@est.fib.upc.edu> wrote:
> Here's the data you asked for:
>
> D: 0
> R: 117 06 0d ff 09 01 a1 01 85 10 a1 00 06 00 ff 09 01 15 00 26 ff 00 75 08
> 95 3f 81 02 c0 09 01 85 11 95 3f b1 02 09 01 85 02 95 01 b1 02 09 01 85 cc
> 95 02 b1 02 09 01 85 b0 95 01 b1 02 09 01 85 b1 95 28 81 02 09 01 85 07 95
> 06 b1 02 09 01 85 08 95 04 b1 02 09 01 85 0a 95 01 b1 02 09 01 85 0b 95 01
> b1 02 09 01 85 0c 95 01 b1 02 09 01 85 0d 95 3f 81 02 c0
> N: Wacom Co.,Ltd. Bamboo Pad, USB
> P: usb-0000:00:1d.7-2.4.3/input0
> I: 3 056a 0318
>
> The three lines you told me are there.

Thanks for the log.
So there are room here for a custom protocol apparently. However, I do
not think the ones we currently have in wacom_wac.c would fit (given
the potential report ID).
So we will need one of the Wacom guys to have a look at it.

Jason, Ping, do you have any info on these devices? Should we turn
them into a proprietary protocol or does the touch only works as a
mouse?

>
> PD: Sorry for not replying correctly. I can't use my gmail because the mail
> server from vger.kernel.org doesn't allow html mails, so I'm using my
> college e-mail address that's redirected to my gmail. So long story short I
> can't hit reply and have to do it manually, sorry for that. I've included
> everyone from the cc, is it ok now? If not please tell me and I'll try to
> avoid the mail redirection so I can reply properly.

One the lower right corner of the mail compose window, there is a
small arrow pointing down. Click it and select "Plain text mode" and
your message will not be sent in html but txt only :)

Cheers,
Benjamin

^ permalink raw reply

* Re: [PATCH] input: Add soft kill switch for input devices
From: Bruno Prémont @ 2015-01-06 21:17 UTC (permalink / raw)
  To: Tristan Lelong; +Cc: linux-input, dmitry.torokhov, linux-kernel
In-Reply-To: <1420352645-3706-1-git-send-email-tristan@lelong.xyz>

On Sat, 03 January 2015 Tristan Lelong <tristan@lelong.xyz> wrote:
> This adds a sysfs attribute named 'mute' to all input devices.
> It allows to disable them by software in a generic way.
> 
> It can be set to 0 or 1:
> echo 1 > /sys/class/input/inputX/mute: will set all the input_events() call to return immediately.
> echo 0 > /sys/class/input/inputX/mute: will reset to default behavior.
> 
> mute is set to 0 by default when calling alloc_input_device().
> 
> Signed-off-by: Tristan Lelong <tristan@lelong.xyz>
> ---
> Hi,
> 
> I created this patch to answer a need on my machine: I want to be able to disable momentarily the touchscreen
> in order to wipe out a dust or clean the display without creating a mess on my desktop and opened docs.
> It seemed consistent to have that kill switch at a central point, and moreover,
> it doesn't depend on any tool linked to a specifc X server, graphical toolkit, desktop environment...
> 
> This patch uses the 0/1 values to enable or disable the mute, but I could update it to use
> enable/disable instead if it is preferred.
> Also, the permissions are write for group or ownoer only.
> I thought about setting it world writable in order to allow easy shortcut creation, but it might also be a security flaw.
> 
> Let me know what you think about all this, at least it is really useful in my case, linked to a keyboard shortcut.
> 
> Best regards
> ---
>  drivers/input/input.c | 30 +++++++++++++++++++++++++++++-
>  include/linux/input.h |  1 +
>  2 files changed, 30 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/input.c b/drivers/input/input.c
> index a1e609a..2f80fee 100644
> --- a/drivers/input/input.c
> +++ b/drivers/input/input.c
> @@ -425,7 +425,7 @@ void input_event(struct input_dev *dev,
>  {
>  	unsigned long flags;
>  
> -	if (is_event_supported(type, dev->evbit, EV_MAX)) {
> +	if (!dev->mute && is_event_supported(type, dev->evbit, EV_MAX)) {
>  
>  		spin_lock_irqsave(&dev->event_lock, flags);
>  		input_handle_event(dev, type, code, value);
> @@ -1384,10 +1384,38 @@ static ssize_t input_dev_show_properties(struct device *dev,
> <snip>

One big issue I see here is that you start dropping all events at a random
point in time.
You may end up within a gesture or just while a button is down and remain
so until that same button gets pressed again on unmute.

On your touchscreen, how do things behave if you trigger the muting while
you are dragging or doing some gesture (and unmute when noone touches
the touchscreen)?

If applied to a keyboard, what happens when you mute while keys are pressed
and unmute when they have long been released?


If you could send a "reset" event to input listeners when muting you could
work around most issues as any application making use of events would know
that after this "reset" event things should not depend on any past state.


Possibly a better way to achieve your aim is to just unbind and re-bind
the device from device driver, causing software hotplug.
That way you are sure no application will perform incorrect guesses while
device is "muted".

Bruno

^ permalink raw reply

* Re: [PATCH] HID: input: fix confusion on conflicting mappings
From: Jiri Kosina @ 2015-01-06 21:19 UTC (permalink / raw)
  To: David Herrmann
  Cc: linux-input, Adam Goode, Fredrik Hallenberg, Benjamin Tissoires,
	Dmitry Torokhov, stable
In-Reply-To: <1419862886-1319-1-git-send-email-dh.herrmann@gmail.com>

On Mon, 29 Dec 2014, David Herrmann wrote:

> On an PC-101/103/104 keyboard (American layout) the 'Enter' key and its
> neighbours look like this:
> 
>            +---+ +---+ +-------+
>            | 1 | | 2 | |   5   |
>            +---+ +---+ +-------+
>              +---+ +-----------+
>              | 3 | |     4     |
>              +---+ +-----------+

[ ... snip ... ]

Alright, I can't really see this introducing any regressions. I have now 
queued this for 3.20.

Thanks!

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: [PATCH trivial] HID: Spelling s/Keayboard/Keyboard/
From: Jiri Kosina @ 2015-01-06 21:20 UTC (permalink / raw)
  To: Geert Uytterhoeven; +Cc: Benjamin Tissoires, linux-input, linux-kernel
In-Reply-To: <1420531753-10668-1-git-send-email-geert@linux-m68k.org>

On Tue, 6 Jan 2015, Geert Uytterhoeven wrote:

> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
>  drivers/hid/Kconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/drivers/hid/Kconfig b/drivers/hid/Kconfig
> index 230b6f887cd86e9b..303b295a5413d39b 100644
> --- a/drivers/hid/Kconfig
> +++ b/drivers/hid/Kconfig
> @@ -388,7 +388,7 @@ config HID_LOGITECH_HIDPP
>  	Say Y if you want support for Logitech devices relying on the HID++
>  	specification. Such devices are the various Logitech Touchpads (T650,
>  	T651, TK820), some mice (Zone Touch mouse), or even keyboards (Solar
> -	Keayboard).
> +	Keyboard).

Applied to hid.git#for-3.20/upstream.

Thanks,

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: [PATCH] hid: Fix battery support for the 2009 ANSI Apple wireless keyboard.
From: Jiri Kosina @ 2015-01-06 21:21 UTC (permalink / raw)
  To: Ross Skaliotis; +Cc: linux-input, linux-kernel
In-Reply-To: <1419120095-11889-1-git-send-email-rskaliotis@gmail.com>

On Sat, 20 Dec 2014, Ross Skaliotis wrote:

> Enabled quirks necessary for correct battery capacity reporting. Cleaned up
> surrounding style.
> 
> Signed-off-by: Ross Skaliotis <rskaliotis@gmail.com>

Applied, thanks.

-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply

* Re: [PATCH] HID: input: fix confusion on conflicting mappings
From: David Herrmann @ 2015-01-06 21:29 UTC (permalink / raw)
  To: Jiri Kosina
  Cc: open list:HID CORE LAYER, Adam Goode, Fredrik Hallenberg,
	Benjamin Tissoires, Dmitry Torokhov, stable
In-Reply-To: <alpine.LNX.2.00.1501062218200.25732@pobox.suse.cz>

Hi

On Tue, Jan 6, 2015 at 10:19 PM, Jiri Kosina <jkosina@suse.cz> wrote:
> On Mon, 29 Dec 2014, David Herrmann wrote:
>
>> On an PC-101/103/104 keyboard (American layout) the 'Enter' key and its
>> neighbours look like this:
>>
>>            +---+ +---+ +-------+
>>            | 1 | | 2 | |   5   |
>>            +---+ +---+ +-------+
>>              +---+ +-----------+
>>              | 3 | |     4     |
>>              +---+ +-----------+
>
> [ ... snip ... ]
>
> Alright, I can't really see this introducing any regressions. I have now
> queued this for 3.20.

As Fredrik wrote, we need to also check for VARIABLE:

    if (!(field->flags & (HID_MAIN_ITEM_RELATIVE |
                  HID_MAIN_ITEM_BUFFERED_BYTE)) &&
        (field->flags & HID_MAIN_ITEM_VARIABLE) &&
        usage->usage_index < field->maxusage &&
        value == field->value[usage->usage_index]) {

the added line is:

            (field->flags & HID_MAIN_ITEM_VARIABLE) &&

I'll not be at home until tomorrow. Feel free to add it yourself,
otherwise, basic HID keyboards that use ARRAY reports are broken.

Thanks
David

^ permalink raw reply

* Re: [PATCH] HID: input: fix confusion on conflicting mappings
From: Jiri Kosina @ 2015-01-06 21:42 UTC (permalink / raw)
  To: David Herrmann
  Cc: open list:HID CORE LAYER, Adam Goode, Fredrik Hallenberg,
	Benjamin Tissoires, Dmitry Torokhov, stable
In-Reply-To: <CANq1E4TYhDzpLofxCr05hvHJMAvtMHEM210ALsB_UOi2=4c7kQ@mail.gmail.com>

On Tue, 6 Jan 2015, David Herrmann wrote:

> >> On an PC-101/103/104 keyboard (American layout) the 'Enter' key and its
> >> neighbours look like this:
> >>
> >>            +---+ +---+ +-------+
> >>            | 1 | | 2 | |   5   |
> >>            +---+ +---+ +-------+
> >>              +---+ +-----------+
> >>              | 3 | |     4     |
> >>              +---+ +-----------+
> >
> > [ ... snip ... ]
> >
> > Alright, I can't really see this introducing any regressions. I have now
> > queued this for 3.20.
> 
> As Fredrik wrote, we need to also check for VARIABLE:

Gah, that's indeed a good catch. For some reason I don't seem to be CCed 
on Fredrik's mail :/

I have now applied the patch below on top of for-3.20/upstream, so that we 
don't keep -next unnecessarily broken.



From: Jiri Kosina <jkosina@suse.cz>
Subject: [PATCH] HID: fixup the conflicting keyboard mappings quirk

The ignore check that got added in 6ce901eb61 ("HID: input: fix confusion
on conflicting mappings") needs to properly check for VARIABLE reports
as well (ARRAY reports should be ignored), otherwise legitimate keyboards
might break.

Cc: <stable@vger.kernel.org>
Fixes: 6ce901eb61 ("HID: input: fix confusion on conflicting mappings")
Reported-by: Fredrik Hallenberg <megahallon@gmail.com>
Reported-by: David Herrmann <dh.herrmann@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
---
 drivers/hid/hid-input.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/hid/hid-input.c b/drivers/hid/hid-input.c
index 84b6899..a758900 100644
--- a/drivers/hid/hid-input.c
+++ b/drivers/hid/hid-input.c
@@ -1113,6 +1113,7 @@ void hidinput_hid_event(struct hid_device *hid, struct hid_field *field, struct
 	 */
 	if (!(field->flags & (HID_MAIN_ITEM_RELATIVE |
 	                      HID_MAIN_ITEM_BUFFERED_BYTE)) &&
+			      (field->flags & HID_MAIN_ITEM_VARIABLE) &&
 	    usage->usage_index < field->maxusage &&
 	    value == field->value[usage->usage_index])
 		return;
-- 
Jiri Kosina
SUSE Labs

^ permalink raw reply related

* [PATCH] HID: core: don't use negative operands when shift
From: Andy Shevchenko @ 2015-01-06 23:17 UTC (permalink / raw)
  To: Jiri Kosina, linux-input; +Cc: Andy Shevchenko

The recent C standard in 6.5.7 paragraph 4 defines that operands for
bitwise shift operators should be non-negative, otherwise it's an
undefined behaviour.

Signed-off-by: Andy Shevchenko <andy.shevchenko@gmail.com>
---
 drivers/hid/hid-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/hid/hid-core.c b/drivers/hid/hid-core.c
index f2a4879..99307f0 100644
--- a/drivers/hid/hid-core.c
+++ b/drivers/hid/hid-core.c
@@ -1027,7 +1027,7 @@ static s32 snto32(__u32 value, unsigned n)
 	case 16: return ((__s16)value);
 	case 32: return ((__s32)value);
 	}
-	return value & (1 << (n - 1)) ? value | (-1 << n) : value;
+	return value & (1 << (n - 1)) ? value | (~0U << n) : value;
 }
 
 s32 hid_snto32(__u32 value, unsigned n)
-- 
1.8.3.101.g727a46b


^ permalink raw reply related

* Re: [PATCH] driver: input :touchscreen : add Raydium I2C touch driver
From: Dmitry Torokhov @ 2015-01-07  0:40 UTC (permalink / raw)
  To: Jeremiah Mahler, jeffrey.lin, rydberg, shc_work, charliemooney,
	bleung, lee.jones, jeffrey.lin, roger.yang, KP.li, linux-kernel,
	linux-input
In-Reply-To: <20150106194354.GA12576@hudson.localdomain>

On Tue, Jan 06, 2015 at 11:43:54AM -0800, Jeremiah Mahler wrote:
> On Tue, Jan 06, 2015 at 05:25:50PM +0800, jeffrey.lin wrote:
> > From: "jeffrey.lin" <jeffrey.lin@rad-ic.com>
> > 
> > This patch is porting Raydium I2C touch driver. Developer can enable
> >  raydium touch driver by modifying define "CONFIG_TOUCHSCREEN_RM_TS".
> > 
> > Signed-off-by: jeffrey.lin@rad-ic.com
> 
> You need your full legal name in your Signed-off-by:

Also, there was feedback provided earlier and I still see it not being
addresses (the presence of custom char dev interface for example). It
would also be helpful if refreshed mentioned what was change from the
previos version.

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] Input:Flush client events after clk_type change
From: Dmitry Torokhov @ 2015-01-07  0:41 UTC (permalink / raw)
  To: Anshul Garg; +Cc: linux-input, anshul.g
In-Reply-To: <1420552953-23932-1-git-send-email-aksgarg1989@gmail.com>

On Tue, Jan 06, 2015 at 06:02:33AM -0800, Anshul Garg wrote:
> From: Anshul Garg <aksgarg1989@gmail.com>
> 
> Since the client clk_type is changed , flush pending
> events from client buffer and queue SYN_DROPPED event.
> Added check for duplicate clk_type change request.
> 
> Signed-off-by: Anshul Garg <anshul.g@samsung.com>
> ---
>  drivers/input/evdev.c |    9 ++++++++-
>  1 file changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/drivers/input/evdev.c b/drivers/input/evdev.c
> index b1a52ab..91330e1 100644
> --- a/drivers/input/evdev.c
> +++ b/drivers/input/evdev.c
> @@ -64,6 +64,9 @@ struct evdev_client {
>  
>  static int evdev_set_clk_type(struct evdev_client *client, unsigned int clkid)
>  {
> +	if (client->clk_type == clkid)
> +		return 0;
> +
>  	switch (clkid) {
>  
>  	case CLOCK_REALTIME:
> @@ -78,7 +81,11 @@ static int evdev_set_clk_type(struct evdev_client *client, unsigned int clkid)
>  	default:
>  		return -EINVAL;
>  	}
> -
> +
> +	/* Flush clients events after clk_type is changed
> +	 * and queue SYN_DROPPED event.*/
> +	client->packet_head = client->head = client->tail;
> +	evdev_queue_syn_dropped(client);

I am fairly certain this is racy wrt the new events coming from the
device.

Thanks.

-- 
Dmitry

^ permalink raw reply

* Re: [PATCH] hid: Initialize battery_no to -1 & correct its format string
From: Ping Cheng @ 2015-01-07  0:50 UTC (permalink / raw)
  To: Aniroop Mathur, Benjamin Tissoires
  Cc: Jason Gerecke, Ping Cheng, Jiri Kosina,
	linux-input@vger.kernel.org, linux-kernel@vger.kernel.org,
	a.mathur
In-Reply-To: <CADYu308MmdGeajFTDt38zZSy7K2VKbDppuqmiJn=1ZwL5d1vmw@mail.gmail.com>

Hi Benjamin,

The relevant code was introduced by
d70420b914c98a3758674c6e9858810e0ab4ea30. Can you take a look and let
us know if Aniroop's patch fits your original thought or not?

Thanks,

Ping

On Tue, Jan 6, 2015 at 6:32 AM, Aniroop Mathur <aniroop.mathur@gmail.com> wrote:
> Dear Mr. Jason and Mr. Ping,
>
> Please update about below patch.
> Except avoiding subtraction, there is also a need to avoid negative
> battery name which may come due to %ld, so need to change to %lu.
>
> Thanks,
> Aniroop
>
> On Mon, Dec 29, 2014 at 5:33 PM, Jiri Kosina <jkosina@suse.cz> wrote:
>> On Sun, 28 Dec 2014, Aniroop Mathur wrote:
>>
>>> From: Aniroop Mathur <a.mathur@samsung.com>
>>>
>>> This patch initializes battery_no to -1 to avoid extra subtraction
>>> operation performed everytime wacom battery is initialized
>>
>> This is so femto-optimization, that I don't really care deeply. Adding
>> Jason and Ping to CC. If they want this, I'll apply the patch.
>>
>>> and correct format string of unsigned long from %ld to %lu.
>>>
>>> Signed-off-by: Aniroop Mathur <a.mathur@samsung.com>
>>> ---
>>>  drivers/hid/wacom_sys.c | 8 ++++----
>>>  1 file changed, 4 insertions(+), 4 deletions(-)
>>>
>>> diff --git a/drivers/hid/wacom_sys.c b/drivers/hid/wacom_sys.c
>>> index 129fd33..4b5ff84 100644
>>> --- a/drivers/hid/wacom_sys.c
>>> +++ b/drivers/hid/wacom_sys.c
>>> @@ -919,17 +919,17 @@ static int wacom_ac_get_property(struct power_supply *psy,
>>>
>>>  static int wacom_initialize_battery(struct wacom *wacom)
>>>  {
>>> -     static atomic_t battery_no = ATOMIC_INIT(0);
>>> +     static atomic_t battery_no = ATOMIC_INIT(-1);
>>>       int error;
>>>       unsigned long n;
>>>
>>>       if (wacom->wacom_wac.features.quirks & WACOM_QUIRK_BATTERY) {
>>> -             n = atomic_inc_return(&battery_no) - 1;
>>> +             n = atomic_inc_return(&battery_no);
>>>
>>>               wacom->battery.properties = wacom_battery_props;
>>>               wacom->battery.num_properties = ARRAY_SIZE(wacom_battery_props);
>>>               wacom->battery.get_property = wacom_battery_get_property;
>>> -             sprintf(wacom->wacom_wac.bat_name, "wacom_battery_%ld", n);
>>> +             sprintf(wacom->wacom_wac.bat_name, "wacom_battery_%lu", n);
>>>               wacom->battery.name = wacom->wacom_wac.bat_name;
>>>               wacom->battery.type = POWER_SUPPLY_TYPE_BATTERY;
>>>               wacom->battery.use_for_apm = 0;
>>> @@ -937,7 +937,7 @@ static int wacom_initialize_battery(struct wacom *wacom)
>>>               wacom->ac.properties = wacom_ac_props;
>>>               wacom->ac.num_properties = ARRAY_SIZE(wacom_ac_props);
>>>               wacom->ac.get_property = wacom_ac_get_property;
>>> -             sprintf(wacom->wacom_wac.ac_name, "wacom_ac_%ld", n);
>>> +             sprintf(wacom->wacom_wac.ac_name, "wacom_ac_%lu", n);
>>>               wacom->ac.name = wacom->wacom_wac.ac_name;
>>>               wacom->ac.type = POWER_SUPPLY_TYPE_MAINS;
>>>               wacom->ac.use_for_apm = 0;
>>> --
>>> 1.9.1
>>>
>>
>> --
>> Jiri Kosina
>> SUSE Labs
> --
> To unsubscribe from this list: send the line "unsubscribe linux-input" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply

* [PATCH 2/4] iio: hid_sensor_hub: update parameters to get feature report
From: Srinivas Pandruvada @ 2015-01-07  0:58 UTC (permalink / raw)
  To: jkosina-AlSwsSmVLrQ, jic23-DgEjT+Ai2ygdnm+yROfE0A
  Cc: linux-iio-u79uwXL29TY76Z2rM5mHXA,
	linux-input-u79uwXL29TY76Z2rM5mHXA, Srinivas Pandruvada
In-Reply-To: <1420592328-9942-1-git-send-email-srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>

The new sensor_hub_get_feature can return multiple values, this
resulted in the change in API. Update the API usage here.

Signed-off-by: Srinivas Pandruvada <srinivas.pandruvada-VuQAYsv1563Yd54FQh9/CA@public.gmane.org>
---
 drivers/iio/common/hid-sensors/hid-sensor-attributes.c | 13 +++++++------
 drivers/iio/common/hid-sensors/hid-sensor-trigger.c    |  4 ++--
 2 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
index 25b01e1..e1435e9 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-attributes.c
@@ -153,8 +153,8 @@ s32 hid_sensor_read_poll_value(struct hid_sensor_common *st)
 	int ret;
 
 	ret = sensor_hub_get_feature(st->hsdev,
-		st->poll.report_id,
-		st->poll.index, &value);
+				     st->poll.report_id,
+				     st->poll.index, sizeof(value), &value);
 
 	if (ret < 0 || value < 0) {
 		return -EINVAL;
@@ -174,8 +174,8 @@ int hid_sensor_read_samp_freq_value(struct hid_sensor_common *st,
 	int ret;
 
 	ret = sensor_hub_get_feature(st->hsdev,
-		st->poll.report_id,
-		st->poll.index, &value);
+				     st->poll.report_id,
+				     st->poll.index, sizeof(value), &value);
 	if (ret < 0 || value < 0) {
 		*val1 = *val2 = 0;
 		return -EINVAL;
@@ -229,8 +229,9 @@ int hid_sensor_read_raw_hyst_value(struct hid_sensor_common *st,
 	int ret;
 
 	ret = sensor_hub_get_feature(st->hsdev,
-		st->sensitivity.report_id,
-		st->sensitivity.index, &value);
+				     st->sensitivity.report_id,
+				     st->sensitivity.index, sizeof(value),
+				     &value);
 	if (ret < 0 || value < 0) {
 		*val1 = *val2 = 0;
 		return -EINVAL;
diff --git a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
index 92068cd..ef0c495 100644
--- a/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
+++ b/drivers/iio/common/hid-sensors/hid-sensor-trigger.c
@@ -76,8 +76,8 @@ int hid_sensor_power_state(struct hid_sensor_common *st, bool state)
 	}
 
 	sensor_hub_get_feature(st->hsdev, st->power_state.report_id,
-					st->power_state.index,
-					&state_val);
+			       st->power_state.index,
+			       sizeof(state_val), &state_val);
 	return 0;
 }
 EXPORT_SYMBOL(hid_sensor_power_state);
-- 
1.9.1

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox