lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <20180126051438.GS7575@gangnam.samsung>
Date:   Fri, 26 Jan 2018 14:14:38 +0900
From:   Andi Shyti <andi.shyti@...sung.com>
To:     Dmitry Torokhov <dmitry.torokhov@...il.com>
Cc:     Marcus Folkesson <marcus.folkesson@...il.com>,
        Simon Shields <simon@...eageos.org>,
        Rob Herring <robh@...nel.org>, linux-input@...r.kernel.org,
        linux-kernel@...r.kernel.org
Subject: Re: [PATCH 4/4 v2] Input: mms114 - add support for mms152

Hi Simon and Dmitry,

On Wed, Jan 24, 2018 at 01:32:01PM -0800, Dmitry Torokhov wrote:
> From: Simon Shields <simon@...eageos.org>
> 
> MMS152 has no configuration registers, but the packet format used in
> interrupts is identical to mms114.
> 
> Signed-off-by: Simon Shields <simon@...eageos.org>
> Patchwork-Id: 10125841
> Signed-off-by: Dmitry Torokhov <dmitry.torokhov@...il.com>

also here

Reviewed-by: Andi Shyti <andi.shyti@...sung.com>
Tested-by: Andi Shyti <andi.shyti@...sung.com>

one small nitpick:

> @@ -239,14 +249,33 @@ static int mms114_get_version(struct mms114_data *data)
>  {
>  	struct device *dev = &data->client->dev;
>  	u8 buf[6];
> +	int group;
>  	int error;

do we really need to define a new 'group' variable?

Andi

> -	error = __mms114_read_reg(data, MMS114_TSP_REV, 6, buf);
> -	if (error < 0)
> -		return error;
> +	switch (data->type) {
> +	case TYPE_MMS152:
> +		error = __mms114_read_reg(data, MMS152_FW_REV, 3, buf);
> +		if (error)
> +			return error;
> +
> +		group = i2c_smbus_read_byte_data(data->client,
> +						  MMS152_COMPAT_GROUP);
> +		if (group < 0)
> +			return group;
> +
> +		dev_info(dev, "TSP FW Rev: bootloader 0x%x / core 0x%x / config 0x%x, Compat group: %c\n",
> +			 buf[0], buf[1], buf[2], group);
> +		break;
> +
> +	case TYPE_MMS114:
> +		error = __mms114_read_reg(data, MMS114_TSP_REV, 6, buf);
> +		if (error)
> +			return error;
>  
> -	dev_info(dev, "TSP Rev: 0x%x, HW Rev: 0x%x, Firmware Ver: 0x%x\n",
> -		 buf[0], buf[1], buf[3]);
> +		dev_info(dev, "TSP Rev: 0x%x, HW Rev: 0x%x, Firmware Ver: 0x%x\n",
> +			 buf[0], buf[1], buf[3]);
> +		break;
> +	}
>  
>  	return 0;
>  }

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ