From patchwork Mon Jun 3 19:20:39 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Weiss X-Patchwork-Id: 10973925 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 88DD31398 for ; Mon, 3 Jun 2019 19:26:42 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7761C28684 for ; Mon, 3 Jun 2019 19:26:42 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 6A1EA286A2; Mon, 3 Jun 2019 19:26:42 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.7 required=2.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 1275028684 for ; Mon, 3 Jun 2019 19:26:42 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726055AbfFCT0l (ORCPT ); Mon, 3 Jun 2019 15:26:41 -0400 Received: from mail.z3ntu.xyz ([128.199.32.197]:55492 "EHLO mail.z3ntu.xyz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726049AbfFCT0l (ORCPT ); Mon, 3 Jun 2019 15:26:41 -0400 X-Greylist: delayed 342 seconds by postgrey-1.27 at vger.kernel.org; Mon, 03 Jun 2019 15:26:40 EDT Received: from localhost.localdomain (80-110-121-20.cgn.dynamic.surfer.at [80.110.121.20]) by mail.z3ntu.xyz (Postfix) with ESMTPSA id A794AC0101; Mon, 3 Jun 2019 19:20:56 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=z3ntu.xyz; s=z3ntu; t=1559589657; bh=0ZOQ8oo0MRQTYnRxEe5Ztp+WG3N9bT3TzGBVaCY33eA=; h=From:To:Cc:Subject:Date; b=oLOzOFaNi+UanyTvl65bDSpLVo7pkbCsfAitG6cfQ5FTxlHTjQkzVkkKqON6CLvwq sXkADZ31m7oqL24vC70ViNBeBPxoHVAWaVaX2G5HjVBhfYqb5086/pDuPccWawedy5 +WD6iAwcriLI7GLmSD0ogWd+/loG82HDl5kzh3nY= From: Luca Weiss Cc: Martijn Braam , Luca Weiss , Jonathan Cameron , Hartmut Knaack , Lars-Peter Clausen , Peter Meerwald-Stadler , linux-iio@vger.kernel.org (open list:IIO SUBSYSTEM AND DRIVERS), linux-kernel@vger.kernel.org (open list) Subject: [PATCH] iio: light: stk3310: Add support for stk3335 Date: Mon, 3 Jun 2019 21:20:39 +0200 Message-Id: <20190603192040.24101-1-luca@z3ntu.xyz> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 To: unlisted-recipients:; (no To-header on input) Sender: linux-iio-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Martijn Braam The stk3335 light/proximity sensor is similar to the stk3310 and stk3311 sensors and works with the stk3310 driver. Signed-off-by: Martijn Braam Signed-off-by: Luca Weiss --- drivers/iio/light/stk3310.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/iio/light/stk3310.c b/drivers/iio/light/stk3310.c index 6e2a169da950..a25cc35f334e 100644 --- a/drivers/iio/light/stk3310.c +++ b/drivers/iio/light/stk3310.c @@ -40,6 +40,7 @@ #define STK3310_CHIP_ID_VAL 0x13 #define STK3311_CHIP_ID_VAL 0x1D +#define STK3335_CHIP_ID_VAL 0x51 #define STK3310_PSINT_EN 0x01 #define STK3310_PS_MAX_VAL 0xFFFF @@ -454,7 +455,8 @@ static int stk3310_init(struct iio_dev *indio_dev) return ret; if (chipid != STK3310_CHIP_ID_VAL && - chipid != STK3311_CHIP_ID_VAL) { + chipid != STK3311_CHIP_ID_VAL && + chipid != STK3335_CHIP_ID_VAL) { dev_err(&client->dev, "invalid chip id: 0x%x\n", chipid); return -ENODEV; } @@ -666,6 +668,7 @@ static SIMPLE_DEV_PM_OPS(stk3310_pm_ops, stk3310_suspend, stk3310_resume); static const struct i2c_device_id stk3310_i2c_id[] = { {"STK3310", 0}, {"STK3311", 0}, + {"STK3335", 0}, {} }; MODULE_DEVICE_TABLE(i2c, stk3310_i2c_id); @@ -673,6 +676,7 @@ MODULE_DEVICE_TABLE(i2c, stk3310_i2c_id); static const struct acpi_device_id stk3310_acpi_id[] = { {"STK3310", 0}, {"STK3311", 0}, + {"STK3335", 0}, {} };