Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp2578305ybt; Fri, 3 Jul 2020 12:45:07 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyhEf+KnmAzu4pvkgSS5D5RMz0ZKUMjHZa0YOrVrt7lWB4qLg30l/ojzfBGG6PI488ar4EU X-Received: by 2002:a50:e791:: with SMTP id b17mr44686661edn.366.1593805507474; Fri, 03 Jul 2020 12:45:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1593805507; cv=none; d=google.com; s=arc-20160816; b=07zEHsU/0Q2gtgaiETagLv0LwjYX3mqvafRb9tfThk9unm5mFqlY7Zx3IhWPg0+RtJ JLw/pWbe8Ei22LX3lNiHUmv+IxErbT27OtTP7eSJySnTCM8TZtR+0FcGGJfLCUMlu4TJ jCQAdSGIfSsjBr0WXkoyAWUEYlD+q34NYHiD4Na/oTPzihTzGggvmrirapoAzKX48gQk GfW3gPAH0KyVbXDdS5S3EeFtsmCWYYoSW2NVji2pZPD2bgZknTM4PXSUt9s89UjX56q6 dcCs0coSc/n4fxpej8O8E1j/oELAnEBJMaPe8pX5h2OqgiSDWO1gHdl+/s8e0Q6DxRVB RgdQ== 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 :message-id:date:subject:cc:to:from:dkim-signature; bh=Ush8cvXJFiUlYc7qxfl++3mGkZixpkv+P4owzqNw6MI=; b=UG28Oxw5ULiHbExCV2+5vHZc1ewmS11PSI0hdcUirIvCF+tloaJUEUUqeXLWYewH+r LUoyoTag4RG0XHo/hVJL2HgJy3Srj0Ho+MYXI7GTW89JJLfG4ec1e7BkRjF34bq/Ife3 xTk7vh5nQwUHYxf80xmqfdKWNimkYkVzqYcPMRc2SUl1V1k/tjexNxhGQTRYwWBVncSm BrPvdOVyesAi7xZmpe8tXRd8hseKjAR26y4LQCqkdp1gPTVmzZXw1FdEbKCpghxQhi+o zUH/KKLy6mZ98tno9JkMZWr1gMQU0GNR70a0E31AZsgxgEAJau38Dy4YQmR8lsLRuTFX cybA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@megous.com header.s=mail header.b="Z/uCE1SW"; 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 b18si8163382ejz.319.2020.07.03.12.44.43; Fri, 03 Jul 2020 12:45:07 -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="Z/uCE1SW"; 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 S1726645AbgGCTo1 (ORCPT + 99 others); Fri, 3 Jul 2020 15:44:27 -0400 Received: from vps.xff.cz ([195.181.215.36]:47630 "EHLO vps.xff.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726236AbgGCTo1 (ORCPT ); Fri, 3 Jul 2020 15:44:27 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=megous.com; s=mail; t=1593805465; bh=mtS2OOnwpcAcf3Vn0Zput13XEuuefUuyocjzu7yZ8/g=; h=From:To:Cc:Subject:Date:From; b=Z/uCE1SWpfQUPh88R+kFhV+o2GxEV223ekwDyj+jMUdO3S38oAVruYrB3/di4HNVZ zLy0Cjvv8VSSpoIYnb2rJ/63E4k3VOj2ql6zYN7AZqtAsLjdlcBIqC1p88XnGs7YkH 3RYPXzV8vo42bRwupJHIdpCw/zcJG5POGk9TV7ks= From: Ondrej Jirman To: linux-kernel@vger.kernel.org Cc: Icenowy Zheng , Ondrej Jirman , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , Luca Weiss , linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS) Subject: [PATCH] iio: light: stk3310: add chip id for STK3311-X variant Date: Fri, 3 Jul 2020 21:44:05 +0200 Message-Id: <20200703194406.110855-1-megous@megous.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 --- 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; -- 2.27.0