Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp469142ybh; Sat, 18 Jul 2020 09:32:53 -0700 (PDT) X-Google-Smtp-Source: ABdhPJySTyIfHZ2/2whXhTrX6LBsO6wTcF4btNorM6XEuk1TzQjs4RtLQM57f6nv4r7V2YU/u72V X-Received: by 2002:a17:906:4a17:: with SMTP id w23mr14049116eju.360.1595089973683; Sat, 18 Jul 2020 09:32:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595089973; cv=none; d=google.com; s=arc-20160816; b=qIAxpPIjbFEix8CZ99dtbPGVIzvFSrb84u/D0ZxuAC2IPi6RwkF3Eb9wEEi6H84CtU D9U9C1yibwjv3JnoesFDr74Rtu/Lf/54+lUjVRRCQfhM1ubMAY5efAlleghVKQke6swy xiCkowTpO/Bs1id1zj97Qb0sK9nKVv22h6N9bSvtRBHeNSI6cYIPQSGlTY3j0zkLyRk9 pZP3ap1Oyg7VR27VGLHjVe+5KUSOB7eHoeor5JS9/I0UOj+3225Cl0cgyq39Sfzwktz2 9xtmBswectfntJ247As7aYzKQe9nv7iwgmsv+Yrx0MmIQR9n1QEaYXT3hcpf7qIq0BCK 8EEQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=/fbT6KfIGW/+eSZck13Nz6H3nxum5Gl8qQElKCcCSXk=; b=zrT1CToWhqzuu/+CWl9B3+iLq0egVlHRTX4HYtHHmBUbRLMYvHReN5/Wj/f4jl6IxV LPrjtXYi73xuS9zM3SML67fT7ABIUm/OM6Tpfw0qUxf08mvwFXXbBfcdAks/DxTSapQr 11kjNfR5suy3U6PJzeSjHwv82yUFtrDT77tCwlaxcfN8jgVMgftaQdjaWwTo4eIsXX9a z1UnblRK7kPa/xy8FbRBurOJmyxNGXyLrXkvQUJ7QoYoHOMHvIV9t29tiWMHDUuFaldL xyrAs7IKil1tQx1bfCajas4q/J+iSu3z63M6sCTwI1kpFfyksTSbeungdiL/Jo/N5TBO ZkjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CnYV7GR4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jp23si7083320ejb.5.2020.07.18.09.32.30; Sat, 18 Jul 2020 09:32:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=CnYV7GR4; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727869AbgGRQ3m (ORCPT + 99 others); Sat, 18 Jul 2020 12:29:42 -0400 Received: from mail.kernel.org ([198.145.29.99]:37936 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726346AbgGRQ3l (ORCPT ); Sat, 18 Jul 2020 12:29:41 -0400 Received: from archlinux (cpc149474-cmbg20-2-0-cust94.5-4.cable.virginm.net [82.4.196.95]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E456E2080D; Sat, 18 Jul 2020 16:29:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1595089781; bh=89r/vzFa0Z0afnvQgRK8zBvAGeUyQXap6+PdGNRqtME=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=CnYV7GR4c9p5VrrTGH/ciCt/4e4mLRDogf8kqvj17IpZfXJoYlwL4CHn78D8db225 LqMHDhGz44GLZ/nkLMfHy9vc6oVaFUkxYzOJZhivpJCxKydTB0Veo3QvMiGv5/NUNR nCa5mnUjHU3uxRll29sG37n2Xc5CY+ul43mWkT1E= Date: Sat, 18 Jul 2020 17:29:37 +0100 From: Jonathan Cameron To: =?UTF-8?B?T25kxZllag==?= Jirman Cc: linux-kernel@vger.kernel.org, Icenowy Zheng , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Luca Weiss , "open list:IIO SUBSYSTEM AND DRIVERS" Subject: Re: [PATCH] iio: light: stk3310: add chip id for STK3311-X variant Message-ID: <20200718172937.59f24822@archlinux> In-Reply-To: <20200714104441.nrnaauqunjst67ix@core.my.home> References: <20200703194406.110855-1-megous@megous.com> <20200704172916.7a8a7359@archlinux> <20200714104441.nrnaauqunjst67ix@core.my.home> X-Mailer: Claws Mail 3.17.5 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 14 Jul 2020 12:44:41 +0200 Ond=C5=99ej Jirman wrote: > Hello Jonathan, >=20 > On Sat, Jul 04, 2020 at 05:29:16PM +0100, Jonathan Cameron wrote: > > On Fri, 3 Jul 2020 21:44:05 +0200 > > Ondrej Jirman wrote: > > =20 > > > From: Icenowy Zheng > > >=20 > > > The STK3311 chip has a variant called STK3311-X, which has a different > > > chip id of 0x12. > > >=20 > > > Add the chip id to the driver. > > >=20 > > > Signed-off-by: Icenowy Zheng > > > Signed-off-by: Ondrej Jirman =20 > >=20 > > Given this is clearly not quite compatible with the stk3311 probably > > best to also add a an id to the of id table. Any idea what else > > is different? =20 >=20 > I've looked at it more, and there's no stk3311 either. It always has > some suffix, like -sa -9 -a -wv -x, .... So I don't think a new > ID in the table is neccessary. The driver can differentiate based on > chip id, in case it will ever become necessary. >=20 Thanks for info. In that case, applied to the togreg branch of iio.git and pushed out as testing for the autobuilders to poke at it. Thanks, Jonathan > regards, > o. >=20 > > Thanks, > >=20 > > Jonathan > > =20 > > > --- > > > drivers/iio/light/stk3310.c | 2 ++ > > > 1 file changed, 2 insertions(+) > > >=20 > > > diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c > > > index 185c24a75ae6..1a8401d198a4 100644 > > > --- a/drivers/iio/light/stk3310.c > > > +++ b/drivers/iio/light/stk3310.c > > > @@ -37,6 +37,7 @@ > > > =20 > > > #define STK3310_CHIP_ID_VAL 0x13 > > > #define STK3311_CHIP_ID_VAL 0x1D > > > +#define STK3311X_CHIP_ID_VAL 0x12 > > > #define STK3335_CHIP_ID_VAL 0x51 > > > #define STK3310_PSINT_EN 0x01 > > > #define STK3310_PS_MAX_VAL 0xFFFF > > > @@ -453,6 +454,7 @@ static int stk3310_init(struct iio_dev *indio_dev) > > > =20 > > > if (chipid !=3D STK3310_CHIP_ID_VAL && > > > chipid !=3D STK3311_CHIP_ID_VAL && > > > + chipid !=3D STK3311X_CHIP_ID_VAL && > > > chipid !=3D STK3335_CHIP_ID_VAL) { > > > dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid); > > > return -ENODEV; =20 > > =20