Received: by 2002:a25:e74b:0:0:0:0:0 with SMTP id e72csp1652147ybh; Tue, 14 Jul 2020 03:48:01 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyYWqbS+vKGgIv8UZaF2ANcQXYBPR4mFO9AlYqmxjlC3oAbl/Avne3RBoIdOBwjhv9ct16S X-Received: by 2002:aa7:d142:: with SMTP id r2mr3712327edo.211.1594723681466; Tue, 14 Jul 2020 03:48:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594723681; cv=none; d=google.com; s=arc-20160816; b=uzrYfmkFEu2AVnoTgjCdGKUwjVl2z1l+5B1Mk6VIBcpj9QQSVokl+xwEPU8KoOV0fO dNJZI/OzKzwgxKdfSbPqANl+4JOy1zKIf/4JZ94YKg7y1s6VLnX7BZIg62YtYqWxHCCb vdzrPAGDbJpR3AXKJ8kok8gpWHWhelKq2zfbHN7M+R5FiwffODcx7xdWo7fXJH8JcbE8 cISTez8tLZwmFTjAmflYO2uPocK6cE/BCVlv9NS2CbGTkyXNUKHKNvaQ2K+CxLcNt5Mk X0zDpjhxTWmlKlMyneYiUuarRRBZ2G3sme+zaTLtLJt2BJVacAUBdTrf97Ycn5lJ6UAR OoXw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:mail-followup-to:message-id:subject:cc:to :from:date:dkim-signature; bh=Lf39SHk/YE08aLJEd/pkqwKlypVOBDbhu7tS3u5gRuY=; b=VpeCDGbiQAuKJyYiS1e/LJw0fLB9Hs9HAcQgzGHsQ81kOXJ+zRUry7b1gvQQSp8pOw 061uzmu2k76kzE0PaRVu3rhLaBZ8/RnF4OdZnaL+ZQHPSt5sTSMUadjWCbXhHHNc77R/ iBq76roEOh8j7Qu4F1/gNTsSlMXHNNZ7Cv2ShlACiZTfazMuqecd6Ctmbp2cb2RbMfKG MRBgnv/zTWlxbs1X5r/ufkhPXaYxgOKUgSef4o0PqE7E4Lk3EVP7nBeiTa+JNJV0EIJP Yb4+qSMWL2JP8UZJQV2GasulXbil+dFcSsIKVFGmvjIQI2uwe66OP5UnGMYECBB17gJ1 zUhA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b=OncBpStI; 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=megous.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id jz6si3096880ejb.508.2020.07.14.03.47.38; Tue, 14 Jul 2020 03:48:01 -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=@megous.com header.s=mail header.b=OncBpStI; 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=megous.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727047AbgGNKop (ORCPT + 99 others); Tue, 14 Jul 2020 06:44:45 -0400 Received: from vps.xff.cz ([195.181.215.36]:46676 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725884AbgGNKoo (ORCPT ); Tue, 14 Jul 2020 06:44:44 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1594723483; bh=ISbEoYLOvtTnx9JsAafH45kzahVwCN2GvMztna3r75U=; h=Date:From:To:Cc:Subject:References:X-My-GPG-KeyId:From; b=OncBpStIUqmS3i3hXXelU7JXxuXUq5IXLIdmNXRLkaE0714lCvMJjquBsA9q2o24V 2+h9+TmGU/uBDmnbsyRUGYwu//RCKNKkU7dm9XEcoBG4POgBi+StuvVDtjZ1y7QFHQ yNfnAOQwNugsPisrgg7HXLp6pOyRM1SHQ6rRSmkg= Date: Tue, 14 Jul 2020 12:44:41 +0200 From: =?utf-8?Q?Ond=C5=99ej?= Jirman To: Jonathan Cameron 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: <20200714104441.nrnaauqunjst67ix@core.my.home> Mail-Followup-To: =?utf-8?Q?Ond=C5=99ej?= Jirman , Jonathan Cameron , linux-kernel@vger.kernel.org, Icenowy Zheng , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Luca Weiss , "open list:IIO SUBSYSTEM AND DRIVERS" References: <20200703194406.110855-1-megous@megous.com> <20200704172916.7a8a7359@archlinux> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200704172916.7a8a7359@archlinux> X-My-GPG-KeyId: EBFBDDE11FB918D44D1F56C1F9F0A873BE9777ED Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hello Jonathan, 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: > > > From: Icenowy Zheng > > > > The STK3311 chip has a variant called STK3311-X, which has a different > > chip id of 0x12. > > > > Add the chip id to the driver. > > > > Signed-off-by: Icenowy Zheng > > Signed-off-by: Ondrej Jirman > > 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? 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. regards, o. > Thanks, > > Jonathan > > > --- > > drivers/iio/light/stk3310.c | 2 ++ > > 1 file changed, 2 insertions(+) > > > > 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 @@ > > > > #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) > > > > if (chipid != STK3310_CHIP_ID_VAL && > > chipid != STK3311_CHIP_ID_VAL && > > + chipid != STK3311X_CHIP_ID_VAL && > > chipid != STK3335_CHIP_ID_VAL) { > > dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid); > > return -ENODEV; >