From patchwork Mon May 9 09:13:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628421 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=caNCUCt8; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8Y19gjz9sGP for ; Mon, 9 May 2022 19:14:21 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzT5-0001Ln-CV; Mon, 09 May 2022 09:14:15 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzT3-0001Kk-9h for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:13 +0000 Received: from mail-pl1-f200.google.com (mail-pl1-f200.google.com [209.85.214.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id F25073F1CA for ; Mon, 9 May 2022 09:14:12 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087653; bh=9nJxXzeYoeitdz3l+UFg4fQj0jKQVHiW2/L2b4k50qQ=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=caNCUCt8Esbmy9z+bdgFF6lcjWHuvdCideysZdQDyD5WpLD6cdQUfkbqecJ7ULBtN cvtzfNAJAwvmLHRGDsmlJ4A/Me9IppTfIoHduOM0cecY5paTabS0IC4ZKME+EUdjYl E1dZxmNuC5PcaXEu7atcsUq8n21ye3vSUkRC10Q/D0F1sUI+SNKIonOXjmYyAAyPCJ OfF8hEw4xOQGi9sEVPTEmSQEfRPcljs+ZxxVx2UOHLn/+DjkRRQbYdozJ+pEpSDrQe OWHbjMiPmDT02JDAdmzpdo2I2LnTB1C5Migl8H9kwqNbtboCGb0vMacHsyp+N9L97O 87efg8QGyGkhw== Received: by mail-pl1-f200.google.com with SMTP id x4-20020a170902ec8400b0015f0c1ec803so1921279plg.15 for ; Mon, 09 May 2022 02:14:12 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=9nJxXzeYoeitdz3l+UFg4fQj0jKQVHiW2/L2b4k50qQ=; b=6+PsxZfBxm6dxc4/24CTz+wwW5wHn/QdEXtkngOd/SfxanHj1bCQ0pQkizkjGnwlPf MTNXVvI/GQ9GaAPff7BZDC1lI6WjjQJuUQJkUQi7l/+V4ndebh5hqoIP+j1ttAxgRaVp uawtEPy6JFMNwj1BAI5HvAH0QZdn3GrTIvGwsIkSYEdyEe4awu9fBvPPVQ7gjQ/sH9sU 36naM16NLDxeF5k25BU+qCEduAVPBX5K/nP/NfK8cwX5wqf0qCfCe065XJOSCYYyP9Vz lEnI4gpGOkjF3lAxwQBQlmXoJZBTBYsFEuDhsQehmugQbti9ms+VAHCWGtGZFem5R102 r0YA== X-Gm-Message-State: AOAM531x3yIHm9WRJxg5vKSlbGDMXG/hv1aiDJLF5z+Mfo7IYIaKboMX hKgDcE0cJWNcd7MDI0dEPhzLRWV0fEiuGBl0Knh40J5uS1rYvvIoNdeDYZYKxv3ryqlUwLvuhgU fmAer0d02qjCO5dPEwXgoMHl2eBKCl3KgShOWx3P8PA== X-Received: by 2002:a63:4e4d:0:b0:3c6:51ec:724c with SMTP id o13-20020a634e4d000000b003c651ec724cmr11250156pgl.297.1652087651560; Mon, 09 May 2022 02:14:11 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwrEbmQfNoPWATda85cF0OTdMB57QiIfQleJ0XKj2ftB9qMgjj6HOvTJwvUfsSZ/NTQX1fy3A== X-Received: by 2002:a63:4e4d:0:b0:3c6:51ec:724c with SMTP id o13-20020a634e4d000000b003c651ec724cmr11250140pgl.297.1652087651323; Mon, 09 May 2022 02:14:11 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.09 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:10 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 01/10] iio: accel: adxl345: Convert to use dev_err_probe() Date: Mon, 9 May 2022 17:13:57 +0800 Message-Id: <20220509091406.39552-2-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Shevchenko BugLink: https://launchpad.net/bugs/1962674 It's fine to call dev_err_probe() in ->probe() when error code is known. Convert the driver to use dev_err_probe(). Signed-off-by: Andy Shevchenko Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220222090009.2060-1-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit 01676b0f3b625a9aa608d5b716898e9dba2fb63e) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345_core.c | 26 +++++++++----------------- drivers/iio/accel/adxl345_i2c.c | 7 ++----- drivers/iio/accel/adxl345_spi.c | 15 +++++---------- 3 files changed, 16 insertions(+), 32 deletions(-) diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel/adxl345_core.c index 4b275051ef61..59c508ac072e 100644 --- a/drivers/iio/accel/adxl345_core.c +++ b/drivers/iio/accel/adxl345_core.c @@ -222,16 +222,12 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap, int ret; ret = regmap_read(regmap, ADXL345_REG_DEVID, ®val); - if (ret < 0) { - dev_err(dev, "Error reading device ID: %d\n", ret); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, "Error reading device ID\n"); - if (regval != ADXL345_DEVID) { - dev_err(dev, "Invalid device ID: %x, expected %x\n", - regval, ADXL345_DEVID); - return -ENODEV; - } + if (regval != ADXL345_DEVID) + return dev_err_probe(dev, -ENODEV, "Invalid device ID: %x, expected %x\n", + regval, ADXL345_DEVID); indio_dev = devm_iio_device_alloc(dev, sizeof(*data)); if (!indio_dev) @@ -245,10 +241,8 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap, ret = regmap_write(data->regmap, ADXL345_REG_DATA_FORMAT, data->data_range); - if (ret < 0) { - dev_err(dev, "Failed to set data range: %d\n", ret); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, "Failed to set data range\n"); indio_dev->name = name; indio_dev->info = &adxl345_info; @@ -259,10 +253,8 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap, /* Enable measurement mode */ ret = regmap_write(data->regmap, ADXL345_REG_POWER_CTL, ADXL345_POWER_CTL_MEASURE); - if (ret < 0) { - dev_err(dev, "Failed to enable measurement mode: %d\n", ret); - return ret; - } + if (ret < 0) + return dev_err_probe(dev, ret, "Failed to enable measurement mode\n"); ret = devm_add_action_or_reset(dev, adxl345_powerdown, data->regmap); if (ret < 0) diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c index a431cba216e6..4363d5bd2ee9 100644 --- a/drivers/iio/accel/adxl345_i2c.c +++ b/drivers/iio/accel/adxl345_i2c.c @@ -28,11 +28,8 @@ static int adxl345_i2c_probe(struct i2c_client *client, return -ENODEV; regmap = devm_regmap_init_i2c(client, &adxl345_i2c_regmap_config); - if (IS_ERR(regmap)) { - dev_err(&client->dev, "Error initializing i2c regmap: %ld\n", - PTR_ERR(regmap)); - return PTR_ERR(regmap); - } + if (IS_ERR(regmap)) + return dev_err_probe(&client->dev, PTR_ERR(regmap), "Error initializing regmap\n"); return adxl345_core_probe(&client->dev, regmap, id->driver_data, id->name); diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index ea559ac2e87d..f590215f0d52 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -26,18 +26,13 @@ static int adxl345_spi_probe(struct spi_device *spi) struct regmap *regmap; /* Bail out if max_speed_hz exceeds 5 MHz */ - if (spi->max_speed_hz > ADXL345_MAX_SPI_FREQ_HZ) { - dev_err(&spi->dev, "SPI CLK, %d Hz exceeds 5 MHz\n", - spi->max_speed_hz); - return -EINVAL; - } + if (spi->max_speed_hz > ADXL345_MAX_SPI_FREQ_HZ) + return dev_err_probe(&spi->dev, -EINVAL, "SPI CLK, %d Hz exceeds 5 MHz\n", + spi->max_speed_hz); regmap = devm_regmap_init_spi(spi, &adxl345_spi_regmap_config); - if (IS_ERR(regmap)) { - dev_err(&spi->dev, "Error initializing spi regmap: %ld\n", - PTR_ERR(regmap)); - return PTR_ERR(regmap); - } + if (IS_ERR(regmap)) + return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing regmap\n"); return adxl345_core_probe(&spi->dev, regmap, id->driver_data, id->name); } From patchwork Mon May 9 09:13:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628422 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=WWrqcXsl; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8b1tyJz9sGJ for ; Mon, 9 May 2022 19:14:23 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzT6-0001NA-Lz; Mon, 09 May 2022 09:14:16 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzT5-0001LM-GM for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:15 +0000 Received: from mail-pj1-f70.google.com (mail-pj1-f70.google.com [209.85.216.70]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 85A533F221 for ; Mon, 9 May 2022 09:14:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087654; bh=DM/kMV4TTg7x2kjo23kC8XN98rMh38rhe2DRpunnZjM=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=WWrqcXslZLj9Rcn8qTJYGzKWwokM6i0G5U6GE4IC80Uxnyyh4yKZx1BIOwaNpN92c lOKXSRizbDpGwwJXuD3qKvb8k7eqbQOtLFFfiRCuCoG8Hbuix3cIXzP/G0I/bxFNyR 4IIwK6fVQZVtvcRI+CGxlMitIqYB9W6+HIUTcbvYKRS7oe0NNa018QqkrOJ+Mqg0pb 6C/cBaQl2+VeohxmqP7feeYpciGpGRwgrGZcwQuuVY2+d63XBWaMh7x1F8baocYxMl qymRQszUoH9TgAI3FnkwumoBtRfWDY4UNkZGY+IevdXSAwQKT8RWk/7A+Bukwxun7P O7yMqK9znamiA== Received: by mail-pj1-f70.google.com with SMTP id h23-20020a17090adb9700b001dcce3bb2d4so5827795pjv.7 for ; Mon, 09 May 2022 02:14:14 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=DM/kMV4TTg7x2kjo23kC8XN98rMh38rhe2DRpunnZjM=; b=iv5yaIhSQ9W3z1WN8i//h0xP6/0oRgfzICBnR8VGy1C5IwsoRzPWjfHzG+1sr3keXF RZhS9vKPoXveeAweV0zz3BDXMrKsxmkw0aauOLKLKkB7tcl5NqsPXcsENPBJy5umMn0b PmuXYf8cRPda90knarKuCZit0NODHcFwbUCa/WBnfGpGZTrqKk7SN0/WxUlHso5F55ON qgvv3kyFctY927L9wMWNzfjKVx3pzejK0oxoDrFTZ3VvfNcBn20Emz0e1BwsR/AnBWTS cqW54VSS4HP/YwwH8kt17ZOS3m2XGQMb7bWivZMykqXbCI1DnCdzzc9/hTnVYLJLVx7E /Vew== X-Gm-Message-State: AOAM532tuMIuM1TDftsLy5jyCkIkjiu2ffuE6d9Vw9ZwfVm4JqhKGxk2 XYlM9jvP2S0ujKRO0/uaunGJHeqEgZvsCQICwvELutVH99UM5uLL1bMnXK+wvAeTU97wIDQggRB MCEydvOsfVZBUxMWzUsXbZ0BzWLNkJnZc1kAvmmmxXA== X-Received: by 2002:a17:90a:ee96:b0:1dc:6680:6f2d with SMTP id i22-20020a17090aee9600b001dc66806f2dmr17152538pjz.174.1652087653327; Mon, 09 May 2022 02:14:13 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOaJ93nQu0PAFqvDeVw0bsLizFt6hzfBVj1qrCqfaEz63G6LPfq8JyGFRcTq7/Z4ChRt8nIA== X-Received: by 2002:a17:90a:ee96:b0:1dc:6680:6f2d with SMTP id i22-20020a17090aee9600b001dc66806f2dmr17152517pjz.174.1652087653072; Mon, 09 May 2022 02:14:13 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.11 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:12 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 02/10] iio: accel: adxl345: Set driver_data for OF enumeration Date: Mon, 9 May 2022 17:13:58 +0800 Message-Id: <20220509091406.39552-3-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Shevchenko BugLink: https://launchpad.net/bugs/1962674 In order to enable this driver on mode platforms, assign driver_data field in the OF device ID table. While at it, make sure that device type is not 0 which may be wrongly interpreted by device property APIs in the future. Signed-off-by: Andy Shevchenko Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220222090009.2060-2-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit 024f5d4f0ac087f73732a3084bdea5029ab0ca6b) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345.h | 4 ++-- drivers/iio/accel/adxl345_i2c.c | 4 ++-- drivers/iio/accel/adxl345_spi.c | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/iio/accel/adxl345.h b/drivers/iio/accel/adxl345.h index af0fdd02c4f2..5a68d4dac717 100644 --- a/drivers/iio/accel/adxl345.h +++ b/drivers/iio/accel/adxl345.h @@ -9,8 +9,8 @@ #define _ADXL345_H_ enum adxl345_device_type { - ADXL345, - ADXL375, + ADXL345 = 1, + ADXL375 = 2, }; int adxl345_core_probe(struct device *dev, struct regmap *regmap, diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c index 4363d5bd2ee9..7feaaba865d3 100644 --- a/drivers/iio/accel/adxl345_i2c.c +++ b/drivers/iio/accel/adxl345_i2c.c @@ -44,8 +44,8 @@ static const struct i2c_device_id adxl345_i2c_id[] = { MODULE_DEVICE_TABLE(i2c, adxl345_i2c_id); static const struct of_device_id adxl345_of_match[] = { - { .compatible = "adi,adxl345" }, - { .compatible = "adi,adxl375" }, + { .compatible = "adi,adxl345", .data = (const void *)ADXL345 }, + { .compatible = "adi,adxl375", .data = (const void *)ADXL375 }, { }, }; diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index f590215f0d52..49625dfa109b 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -46,8 +46,8 @@ static const struct spi_device_id adxl345_spi_id[] = { MODULE_DEVICE_TABLE(spi, adxl345_spi_id); static const struct of_device_id adxl345_of_match[] = { - { .compatible = "adi,adxl345" }, - { .compatible = "adi,adxl375" }, + { .compatible = "adi,adxl345", .data = (const void *)ADXL345 }, + { .compatible = "adi,adxl375", .data = (const void *)ADXL375 }, { }, }; From patchwork Mon May 9 09:13:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628423 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=T30tzeiY; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8d4Ncnz9sGJ for ; Mon, 9 May 2022 19:14:25 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzT9-0001Qe-2M; Mon, 09 May 2022 09:14:19 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzT6-0001Mo-Ch for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:16 +0000 Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 1B0A63F221 for ; Mon, 9 May 2022 09:14:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087656; bh=dZuwBHNda+F4ncUaCiyjWzsonRP8JOtU2vdwJ5Q9bA0=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=T30tzeiYFBLNKBPtqiBIln8KRfZmj1NWPmGVd+twCtKFn96CzdO2Z2K8wMw4elp54 3SyVazhtB/3hTd0oNnR7B2iO0vmwPZWWrOGQ48ZQ3zPRLwXjIlHz9ZkprKY42EVTdP 8W+vCTIwnwfloMJ5bsAM4Vh9Erv+KbF9JxbhoLRiRn42LLcUsEfsx6TQzbpdtm31nz g/oftmCekf2TXHWswKMEXKjXKY2MRI6i4XhL3/FnjtbXG54saMEcGbirPWRLR3OgcE a/HXqkzJfMjBS6Fa/TFs1BOw78sWoqRHCwq9nYV1KXijCkl4zoHWBZGPWT+hus4I0S Z1VOh88MMvhpg== Received: by mail-pj1-f72.google.com with SMTP id q91-20020a17090a756400b001d951f4846cso10271189pjk.8 for ; Mon, 09 May 2022 02:14:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=dZuwBHNda+F4ncUaCiyjWzsonRP8JOtU2vdwJ5Q9bA0=; b=A50r+AfMzeh+nGhu/5goPwSXOCn7htMEYsLCYpn/ufeDSK684yutju4g9qGeHS+tev 2MHvANfCVqyDQUupmxKc7eUBR79kOgFytvnuIVCBGY01Dgwhm7aL3TlS9ddaroClMSnR CAOvU3lw4M8R+XcUmeEALixNtBhSV498K5/lhn95sw+wEx1BprUUq/Jr1jX2u92IQbMl pMv+l8U4OKP9BAEbOkQjPxVIabOnnNn0tkJsikaPZSiCU57K29XdIz6iKXU+lNe8iDgy iYB2Vt2Bka0eDe57pYyhFoVdg0hyjYbAGpA8p1Ey+SNNnBi+Qd56ilQLKI1mKPShoP9V IJng== X-Gm-Message-State: AOAM530EsM9QEnhkS198aZnivniuu5AdczsWVZWJV70GpiBm/eExTtUD gT2zBXcJ5z29I6VdlYbeH80sTpi8PUFtqcs1Mt1XxiEk9LrpVgZ19g/AumY3aYb0jivc2KIkSK8 yJKliqVh9TOKxT7+tuaAsQjrMrnKuM2XOhFz/E1Klew== X-Received: by 2002:a17:90b:4c10:b0:1dc:8289:7266 with SMTP id na16-20020a17090b4c1000b001dc82897266mr25565459pjb.190.1652087654809; Mon, 09 May 2022 02:14:14 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwuNp+EpVZFWzBA2im83n+ut22qlGN5v//zgWB2jZazl3HVMcVge+8Ern+RGTvZ9QhlKSRbMQ== X-Received: by 2002:a17:90b:4c10:b0:1dc:8289:7266 with SMTP id na16-20020a17090b4c1000b001dc82897266mr25565443pjb.190.1652087654567; Mon, 09 May 2022 02:14:14 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.13 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:14 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 03/10] iio: accel: adxl345: Get rid of name parameter in adxl345_core_probe() Date: Mon, 9 May 2022 17:13:59 +0800 Message-Id: <20220509091406.39552-4-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Shevchenko BugLink: https://launchpad.net/bugs/1962674 As a preparation to switch to use device properties, get rid of name parameter in adxl345_core_probe(). Instead, choose it based on the type. Signed-off-by: Andy Shevchenko Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220222090009.2060-3-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit c1db3d5cab03a79947736c44fd33f19f234b14a0) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345.h | 4 ++-- drivers/iio/accel/adxl345_core.c | 15 +++++++++++++-- drivers/iio/accel/adxl345_i2c.c | 3 +-- drivers/iio/accel/adxl345_spi.c | 2 +- 4 files changed, 17 insertions(+), 7 deletions(-) diff --git a/drivers/iio/accel/adxl345.h b/drivers/iio/accel/adxl345.h index 5a68d4dac717..b01cb0ccf8dc 100644 --- a/drivers/iio/accel/adxl345.h +++ b/drivers/iio/accel/adxl345.h @@ -13,7 +13,7 @@ enum adxl345_device_type { ADXL375 = 2, }; -int adxl345_core_probe(struct device *dev, struct regmap *regmap, - enum adxl345_device_type type, const char *name); +int adxl345_core_probe(struct device *dev, struct regmap *regmap, enum adxl345_device_type type); +int adxl345_core_remove(struct device *dev); #endif /* _ADXL345_H_ */ diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel/adxl345_core.c index 59c508ac072e..c616dc024f2f 100644 --- a/drivers/iio/accel/adxl345_core.c +++ b/drivers/iio/accel/adxl345_core.c @@ -213,14 +213,25 @@ static void adxl345_powerdown(void *regmap) regmap_write(regmap, ADXL345_REG_POWER_CTL, ADXL345_POWER_CTL_STANDBY); } -int adxl345_core_probe(struct device *dev, struct regmap *regmap, - enum adxl345_device_type type, const char *name) +int adxl345_core_probe(struct device *dev, struct regmap *regmap, enum adxl345_device_type type) { struct adxl345_data *data; struct iio_dev *indio_dev; + const char *name; u32 regval; int ret; + switch (type) { + case ADXL345: + name = "adxl345"; + break; + case ADXL375: + name = "adxl375"; + break; + default: + return -EINVAL; + } + ret = regmap_read(regmap, ADXL345_REG_DEVID, ®val); if (ret < 0) return dev_err_probe(dev, ret, "Error reading device ID\n"); diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c index 7feaaba865d3..31abdf6cc596 100644 --- a/drivers/iio/accel/adxl345_i2c.c +++ b/drivers/iio/accel/adxl345_i2c.c @@ -31,8 +31,7 @@ static int adxl345_i2c_probe(struct i2c_client *client, if (IS_ERR(regmap)) return dev_err_probe(&client->dev, PTR_ERR(regmap), "Error initializing regmap\n"); - return adxl345_core_probe(&client->dev, regmap, id->driver_data, - id->name); + return adxl345_core_probe(&client->dev, regmap, id->driver_data); } static const struct i2c_device_id adxl345_i2c_id[] = { diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index 49625dfa109b..fefb99e00cb3 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -34,7 +34,7 @@ static int adxl345_spi_probe(struct spi_device *spi) if (IS_ERR(regmap)) return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing regmap\n"); - return adxl345_core_probe(&spi->dev, regmap, id->driver_data, id->name); + return adxl345_core_probe(&spi->dev, regmap, id->driver_data); } static const struct spi_device_id adxl345_spi_id[] = { From patchwork Mon May 9 09:14:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628424 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=bHhJfzC6; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8g4vgqz9sGJ for ; Mon, 9 May 2022 19:14:27 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzTB-0001U3-4e; Mon, 09 May 2022 09:14:21 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzT8-0001Oo-7P for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:18 +0000 Received: from mail-pf1-f199.google.com (mail-pf1-f199.google.com [209.85.210.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 9B27F3F1CA for ; Mon, 9 May 2022 09:14:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087657; bh=WQsb0KMiueupjyg72BPPwwF+GcHTIM2aprO+WPrOYSU=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=bHhJfzC6R1GL1i5NKjEvsXz5t51HmJS1hw1yGO9nOory58gluVyOl0CqYvf/0ogsT LWSvnoEY7nGccLx2kYZzbVAaM3IGj9/n4dySwCNGOybh1bARRVsOs/iDQMJD20FUcg PsALHcronvlaK44tRHo4n4ky3FT48HQcFot1nTJE53bMft2RvzBeZ0sdRgyRIghfaG 1g27NRTiW4Q33Moj3dtJasgKTv+AqMXPRAWeOXnLyTpf2m/eMblM9BuaE9kb+c+nDA LUNlfI1g8rfXWWb2WUY1Swa1Bn5Klb22+Qjag5F0vtPi/HFJ6TKvsx6X7wuQX46lbM Mq5pSclRgEeiQ== Received: by mail-pf1-f199.google.com with SMTP id z34-20020a056a001da200b0050e057fdd7eso4451524pfw.12 for ; Mon, 09 May 2022 02:14:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=WQsb0KMiueupjyg72BPPwwF+GcHTIM2aprO+WPrOYSU=; b=pt5hKQ2KkBNOhcaMO/RU35ZifI/T9x16Cy0Iae+CuOkDYWwIbfWQrHk/90pNGwDFwF 3MTA9pOpvJFOwlDEe+B/8Zi/TH/ImxbKnoGlUPFsPR247yTAeJaYR8uIgOdo/vIP19HW V7T0FcwTk43yDIadHmqfKlS12c+uN4rPLHZBzJb8sRU/279QTJ4Yk+xvlBxptJLgG/M5 RQ/OlYQffZEBh1UbT1qb559M4LTXl6zfk1ARSKjcacpJcNwIhZgk92d/8VPJN2PykN/8 0jl/LA3JUVS5Slm2E+H5k2lvaMaLgJSxlowDrYv4c/weOgD/wMWoQ1jMm4xvmkJQ/0Rc 3TWg== X-Gm-Message-State: AOAM533/bXuDx6VUiL1aYSnyeqo1ShwtwYzei/KKwtACC85BJv/pVe9+ ftRiBhVG8M1FulMRRn6TGDRoxh3/oxEiAAJOoiiHghT3GOCpMZyp2jBxkv1FDXimiq93mxPtkf3 pdI+v2+IitBvvuKR1rLQ1wVhi/T667ABAuF+sixWUMw== X-Received: by 2002:a17:90b:3642:b0:1dd:dad:f279 with SMTP id nh2-20020a17090b364200b001dd0dadf279mr6765007pjb.224.1652087656268; Mon, 09 May 2022 02:14:16 -0700 (PDT) X-Google-Smtp-Source: ABdhPJx6fK2YGGWE9yrIwsinHbIKxtDUvNPPKPxkXI7ydpMaAzIF+50Z3Gc2ck2l1+C7ijWBykpvhA== X-Received: by 2002:a17:90b:3642:b0:1dd:dad:f279 with SMTP id nh2-20020a17090b364200b001dd0dadf279mr6764988pjb.224.1652087655987; Mon, 09 May 2022 02:14:15 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.14 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:15 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 04/10] iio: accel: adxl345: Make use of device properties Date: Mon, 9 May 2022 17:14:00 +0800 Message-Id: <20220509091406.39552-5-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Shevchenko BugLink: https://launchpad.net/bugs/1962674 Convert the module to be property provider agnostic and allow it to be used on non-OF platforms. Signed-off-by: Andy Shevchenko Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220222090009.2060-4-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit 266be7cb11c75f930a5902bc6199ff50ca4282a1) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345.h | 2 +- drivers/iio/accel/adxl345_core.c | 5 ++++- drivers/iio/accel/adxl345_i2c.c | 11 ++++------- drivers/iio/accel/adxl345_spi.c | 3 +-- 4 files changed, 10 insertions(+), 11 deletions(-) diff --git a/drivers/iio/accel/adxl345.h b/drivers/iio/accel/adxl345.h index b01cb0ccf8dc..4d1699f7c182 100644 --- a/drivers/iio/accel/adxl345.h +++ b/drivers/iio/accel/adxl345.h @@ -13,7 +13,7 @@ enum adxl345_device_type { ADXL375 = 2, }; -int adxl345_core_probe(struct device *dev, struct regmap *regmap, enum adxl345_device_type type); +int adxl345_core_probe(struct device *dev, struct regmap *regmap); int adxl345_core_remove(struct device *dev); #endif /* _ADXL345_H_ */ diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel/adxl345_core.c index c616dc024f2f..ad039fb0e1bd 100644 --- a/drivers/iio/accel/adxl345_core.c +++ b/drivers/iio/accel/adxl345_core.c @@ -8,6 +8,7 @@ */ #include +#include #include #include @@ -213,14 +214,16 @@ static void adxl345_powerdown(void *regmap) regmap_write(regmap, ADXL345_REG_POWER_CTL, ADXL345_POWER_CTL_STANDBY); } -int adxl345_core_probe(struct device *dev, struct regmap *regmap, enum adxl345_device_type type) +int adxl345_core_probe(struct device *dev, struct regmap *regmap) { + enum adxl345_device_type type; struct adxl345_data *data; struct iio_dev *indio_dev; const char *name; u32 regval; int ret; + type = (uintptr_t)device_get_match_data(dev); switch (type) { case ADXL345: name = "adxl345"; diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c index 31abdf6cc596..cfb6179d1152 100644 --- a/drivers/iio/accel/adxl345_i2c.c +++ b/drivers/iio/accel/adxl345_i2c.c @@ -19,19 +19,15 @@ static const struct regmap_config adxl345_i2c_regmap_config = { .val_bits = 8, }; -static int adxl345_i2c_probe(struct i2c_client *client, - const struct i2c_device_id *id) +static int adxl345_i2c_probe(struct i2c_client *client) { struct regmap *regmap; - if (!id) - return -ENODEV; - regmap = devm_regmap_init_i2c(client, &adxl345_i2c_regmap_config); if (IS_ERR(regmap)) return dev_err_probe(&client->dev, PTR_ERR(regmap), "Error initializing regmap\n"); - return adxl345_core_probe(&client->dev, regmap, id->driver_data); + return adxl345_core_probe(&client->dev, regmap); } static const struct i2c_device_id adxl345_i2c_id[] = { @@ -55,7 +51,8 @@ static struct i2c_driver adxl345_i2c_driver = { .name = "adxl345_i2c", .of_match_table = adxl345_of_match, }, - .probe = adxl345_i2c_probe, + .remove = adxl345_i2c_remove, + .probe_new = adxl345_i2c_probe, .id_table = adxl345_i2c_id, }; diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index fefb99e00cb3..dbf0d538c1c1 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -22,7 +22,6 @@ static const struct regmap_config adxl345_spi_regmap_config = { static int adxl345_spi_probe(struct spi_device *spi) { - const struct spi_device_id *id = spi_get_device_id(spi); struct regmap *regmap; /* Bail out if max_speed_hz exceeds 5 MHz */ @@ -34,7 +33,7 @@ static int adxl345_spi_probe(struct spi_device *spi) if (IS_ERR(regmap)) return dev_err_probe(&spi->dev, PTR_ERR(regmap), "Error initializing regmap\n"); - return adxl345_core_probe(&spi->dev, regmap, id->driver_data); + return adxl345_core_probe(&spi->dev, regmap); } static const struct spi_device_id adxl345_spi_id[] = { From patchwork Mon May 9 09:14:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628425 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=obZhd5c7; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8m6r4nz9sGJ for ; Mon, 9 May 2022 19:14:32 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzTE-0001ac-SH; Mon, 09 May 2022 09:14:24 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzTB-0001RG-2f for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:21 +0000 Received: from mail-pg1-f200.google.com (mail-pg1-f200.google.com [209.85.215.200]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 2BCC63F1CA for ; Mon, 9 May 2022 09:14:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087659; bh=B7DrwQx0aXVcm8dIvdeNZfUPJvzL0Vj/Y5dJdBCTois=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=obZhd5c7rzTxuf8XY35JXZO+65rv9mBi4DsmfrMvPdU+UpBU8bAL4+5N7GSo1Ylbu nWqhDSAYeIhCtyTGq/7v8P66Jtovc7cogSIfjSnFzErViYKyKtl5T42NzgduOpyDfD bSi5UHjNbLVw69qHMhQiOyZOT0yVuDQ8yzCXXJ5N1wA17NCrotX0dxpyR6KwtL238r /z9OLZzhltye1L/603A97gZWkgAZNUIUfYHFGRaE3KEYDFMffLvOMusa6Cgw+plj/C rJgcjxZi7Gsmss0QVtQfG4LUv2d+itNTehXMkg5FEHcyxmLiCOJsiMefWJHC0gFqzq J1sAF22ps+yUQ== Received: by mail-pg1-f200.google.com with SMTP id h128-20020a636c86000000b003c574b3422aso7098141pgc.12 for ; Mon, 09 May 2022 02:14:19 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=B7DrwQx0aXVcm8dIvdeNZfUPJvzL0Vj/Y5dJdBCTois=; b=fJf8j+Lq7tFutCXyTZRSLfF/Sh7SwJRAZyK3KSTiv8KGaVJIJrRu8WHpGyHv5TT7Ah CyytVA/0xQpVaFx/VtqEUAXvci7MiI6yv4VwM4jlusNCK1ACRPIbMHulhv2kutItUKaZ Gfnx5i4AD5D3K3K/pDaDRbNeZV3/NErwfjfsM/BHt+ZpEieLRkB7D8sSvj/ia0Zt9VaC FYS2rnJE0vbaHFEX//alp7cqsRIQO1lewZSKpaTAoTGD+ikxii/pItZr7GQ3r8mcq0gC SXk0aeezCtGQ8cFIJNwtCUyA0ORESqTjL3scBVbMa2gJBegVdzq+FXHenqE2Z0nx7onE oeGQ== X-Gm-Message-State: AOAM5321HUwlhodKfYkiVqMVetTywdgdP3bFRIaMbvpjUqYA+pmxV8Zz pDZc003Z5ETrnzl8sTdWmpFNKBWxN6QAjksbUFQCVusMJ+LmhIGMH7/P3Ti2lY3vt7EeMELzu9K uOM4L1tcG0Zl9SR+K3Ee1jTTLlLdWYmkJxmtUBd0O7Q== X-Received: by 2002:a17:902:c2cf:b0:15f:1396:f54e with SMTP id c15-20020a170902c2cf00b0015f1396f54emr4042889pla.161.1652087657867; Mon, 09 May 2022 02:14:17 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw9lp+Rx50oH6TkYRSHhZ1T1gZXrWuZ2qXEtWJmlAPpbnZtX8w5ri5M6GfWyjjl4jLPqDJKGQ== X-Received: by 2002:a17:902:c2cf:b0:15f:1396:f54e with SMTP id c15-20020a170902c2cf00b0015f1396f54emr4042873pla.161.1652087657584; Mon, 09 May 2022 02:14:17 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.16 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:17 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 05/10] iio: accel: adxl345: Add ACPI HID table Date: Mon, 9 May 2022 17:14:01 +0800 Message-Id: <20220509091406.39552-6-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Kai-Heng Feng BugLink: https://launchpad.net/bugs/1962674 x86 boards may use ACPI HID "ADS0345" for adxl345 device. Analog replied: "ADS034X is not a valid PNP ID. ADS0345 would be. I'm not aware that this ID is already taken. Feel free to submit a mainline Linux input mailing list patch." So add an ACPI match table for that accordingly. Since ACPI device may not match to any I2C ID, use the name and type directly from ACPI ID table in absence of I2C ID. Suggested-by: Andy Shevchenko Signed-off-by: Kai-Heng Feng Signed-off-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220222090009.2060-5-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit b9493d595226b598ed79b3769f7038fda1a5391b) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345_i2c.c | 7 +++++++ drivers/iio/accel/adxl345_spi.c | 7 +++++++ 2 files changed, 14 insertions(+) diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c index cfb6179d1152..90f471add84c 100644 --- a/drivers/iio/accel/adxl345_i2c.c +++ b/drivers/iio/accel/adxl345_i2c.c @@ -46,10 +46,17 @@ static const struct of_device_id adxl345_of_match[] = { MODULE_DEVICE_TABLE(of, adxl345_of_match); +static const struct acpi_device_id adxl345_acpi_match[] = { + { "ADS0345", ADXL345 }, + { } +}; +MODULE_DEVICE_TABLE(acpi, adxl345_acpi_match); + static struct i2c_driver adxl345_i2c_driver = { .driver = { .name = "adxl345_i2c", .of_match_table = adxl345_of_match, + .acpi_match_table = adxl345_acpi_match, }, .remove = adxl345_i2c_remove, .probe_new = adxl345_i2c_probe, diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index dbf0d538c1c1..3943c71db77a 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -52,10 +52,17 @@ static const struct of_device_id adxl345_of_match[] = { MODULE_DEVICE_TABLE(of, adxl345_of_match); +static const struct acpi_device_id adxl345_acpi_match[] = { + { "ADS0345", ADXL345 }, + { } +}; +MODULE_DEVICE_TABLE(acpi, adxl345_acpi_match); + static struct spi_driver adxl345_spi_driver = { .driver = { .name = "adxl345_spi", .of_match_table = adxl345_of_match, + .acpi_match_table = adxl345_acpi_match, }, .probe = adxl345_spi_probe, .id_table = adxl345_spi_id, From patchwork Mon May 9 09:14:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628426 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=Sxxm95vc; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8p5dDRz9sGJ for ; Mon, 9 May 2022 19:14:34 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzTG-0001dF-1W; Mon, 09 May 2022 09:14:26 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzTB-0001TO-2X for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:21 +0000 Received: from mail-pg1-f199.google.com (mail-pg1-f199.google.com [209.85.215.199]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 8C7A83F221 for ; Mon, 9 May 2022 09:14:20 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087660; bh=hLac8A/1emrjVGhua43Zi3xeRWxJSB/6hvHSjZGX3jc=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Sxxm95vcr/bzjA5FjxwrCVQLfWbM3tQ35ncWOj/MZ26az0++/as6dVuFvpT+gg2Vi yiXRd1PC/g2HWisAsbSA8+eIYBr14IwVuX+N2hihL97THR8rpTN4dq749HC1/4UtPe FfScaSEIATQhDoNXaBf7M55Qqj5uOCMaOldx11cqRgGhRXSt8Q3zROsJBzKrai15rK pcmpTv8GAcmzLp1r7z9kUjK0q1VI401ANGQhdabpXjFCOa0lv5dB5UsvNrT2DDOerq /MggFh8eqnzkckGgj0Pjw/R3wHFGLd6HWyZjbrv62bxWT1QsPSJ6kcmxgPonT9lLnP Z/unlGdXoeGzA== Received: by mail-pg1-f199.google.com with SMTP id q13-20020a638c4d000000b003821725ad66so7083866pgn.23 for ; Mon, 09 May 2022 02:14:20 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=hLac8A/1emrjVGhua43Zi3xeRWxJSB/6hvHSjZGX3jc=; b=JKt8RXcGFYW4t4vDKvKYYwedE5y6uzBmpU7XKSk6s5pS2o5Jh8fs02TkK88GOAhXMZ vdQiJYg85tLn8mnTuhvAyYo9HuvzcT8NPawdtGScGEgFElW///PKQnFBtGiRXh1Zj9fy WbERp6vCD47IoL9CiFz1B5rTXG8onPX77cuMW10ldMw/vrNoOd4Ntdxg2meMI7b2Fe71 Cxmb4yusVfj/RK6CUQIpRYK/qgLMTzndUNY5Cd6dd1pi0SZCnDQ77dCgoLWZIpKPn3kB 7733stUjD++tKjmrtTPfYh/skKBF33Aprlp/NZI6k1JFLRZnTto9zSUrzbZy80tW0FzP eolg== X-Gm-Message-State: AOAM533kwL8LLuHGXzXLy1aWalBbKsiJYtasVwdIU8LSxTl9Kre15ByR eHPF/rfza1LF+hjMliL1je97fLQw0hc6SZSu/cttmsFxRWkGFqapGnvo9vm/lX9qO9SSwi1UXIx O2Be1LDOwLSLMZDaLjvBX/p99C4TjOHGZCGMuLkgS6Q== X-Received: by 2002:a63:4d4:0:b0:3c1:f13f:a9a1 with SMTP id 203-20020a6304d4000000b003c1f13fa9a1mr12303664pge.398.1652087659263; Mon, 09 May 2022 02:14:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw7LW7Gv+3TFYdOf74hv20sR9vXDgFCaO4yr4tYKEiDk+culw37uddlzOlgdjddlWcROo11uw== X-Received: by 2002:a63:4d4:0:b0:3c1:f13f:a9a1 with SMTP id 203-20020a6304d4000000b003c1f13fa9a1mr12303647pge.398.1652087658960; Mon, 09 May 2022 02:14:18 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.17 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:18 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 06/10] iio: accel: adxl345: Extract adxl345_powerup() helper Date: Mon, 9 May 2022 17:14:02 +0800 Message-Id: <20220509091406.39552-7-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Shevchenko BugLink: https://launchpad.net/bugs/1962674 For the sake of symmetry and possible reuse in the future extract adxl435_powerup() helper. Signed-off-by: Andy Shevchenko Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220222090009.2060-6-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit 5b4c63f691b848322166cace3be464a90b42065f) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345_core.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel/adxl345_core.c index ad039fb0e1bd..f69141be7348 100644 --- a/drivers/iio/accel/adxl345_core.c +++ b/drivers/iio/accel/adxl345_core.c @@ -209,6 +209,11 @@ static const struct iio_info adxl345_info = { .write_raw_get_fmt = adxl345_write_raw_get_fmt, }; +static int adxl345_powerup(void *regmap) +{ + return regmap_write(regmap, ADXL345_REG_POWER_CTL, ADXL345_POWER_CTL_MEASURE); +} + static void adxl345_powerdown(void *regmap) { regmap_write(regmap, ADXL345_REG_POWER_CTL, ADXL345_POWER_CTL_STANDBY); @@ -265,8 +270,7 @@ int adxl345_core_probe(struct device *dev, struct regmap *regmap) indio_dev->num_channels = ARRAY_SIZE(adxl345_channels); /* Enable measurement mode */ - ret = regmap_write(data->regmap, ADXL345_REG_POWER_CTL, - ADXL345_POWER_CTL_MEASURE); + ret = adxl345_powerup(data->regmap); if (ret < 0) return dev_err_probe(dev, ret, "Failed to enable measurement mode\n"); From patchwork Mon May 9 09:14:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628429 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=sOoUFZwu; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8w23sSz9sGJ for ; Mon, 9 May 2022 19:14:40 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzTM-0001lw-0Q; Mon, 09 May 2022 09:14:32 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzTE-0001Zp-Au for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:24 +0000 Received: from mail-pj1-f72.google.com (mail-pj1-f72.google.com [209.85.216.72]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 960773F1CA for ; Mon, 9 May 2022 09:14:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087663; bh=QteDyT1M52bLI+c2Zoqny7Mrhc5J9mdZ1akCVI7rxtA=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=sOoUFZwu8zJ5MLlE+0oalJtAiFarKf5yRLsSVJRw6+PdD7qBqUpCRRmOFhotelrAc 66R/07NS+efn4GH5GrjtmmDf3bYB++0HW6qacwXXt63VtzGgjtdkgSye2NQMebMq/Y 1LqUfXbgq1/lImUt8H51SJEtIcqUP+CyCbIgGFGYYYH1nS0nZbyiGs17m+UcRTbe6a aiidDt4ifakT/5l3oumOAbrA+abACCtWngsRuNDMu1+4HE0tNY5lx+RqPQ0Rab7Jqa ZlCUuN6wErd/RLcauk7Tpf2ua/YolMF0+QjpEpzF3YayRZbb8eJMQ25gtb4PSYwfMS YFVeCUIov+a2A== Received: by mail-pj1-f72.google.com with SMTP id a24-20020a17090a8c1800b001d98eff7882so6097490pjo.8 for ; Mon, 09 May 2022 02:14:23 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=QteDyT1M52bLI+c2Zoqny7Mrhc5J9mdZ1akCVI7rxtA=; b=g6k73I9rTxJy/2UgTbfTkkOjZjh9iAwDKUGODJ3bAgXmTFTyUuIHY+ferBjbXiBUl9 xe7UfqKHV4qhhvi5jan0+7C/MLTaYadNS9tTBUdAYepPcPomxDUodxleBycTsXxXdaat e6vDH7wT/FwaeVasJ43jgimge7VLs4qIcs2jxipGnsJAjePLyQKJY78TbJVHSa+BKulz p/6+4/rwIPKGLkrKxijx00dkqcbXmKruUHLUDf0RgyIfGHuikIpCc2sOr3KW8O4Z6c8r nfNBf9EEDJ00ow7LGMP+A11Q1t3/x8xl8JtmimXdKMSF4lajKZ0LA2TfZ5Awzrxi6D9s hkOQ== X-Gm-Message-State: AOAM5324l8HbDcq7fgfSGZzaIrWDOu+sVd1U/zCa9/4Px3g5j6PiH6Yq vvs6ZtKuGODWQ6aIaF4hN4igQzeMcoggF42ZIg3vMJtuBRKIogg2cLxtFx+C4p2CE6LzoysXEEW O1py6/SK5JR2qTrmeY7Zm3kV5kpkdiWb2/ZZOzrWiTA== X-Received: by 2002:a17:902:ab5c:b0:15c:ea3a:9437 with SMTP id ij28-20020a170902ab5c00b0015cea3a9437mr15572708plb.9.1652087660930; Mon, 09 May 2022 02:14:20 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzUBxkC7hB+C8QHdC1DUbFRUWq7OlnO0ODoniPseE7jcCc7p55a5kqyQzZNZguDiL32+XAa1Q== X-Received: by 2002:a17:902:ab5c:b0:15c:ea3a:9437 with SMTP id ij28-20020a170902ab5c00b0015cea3a9437mr15572681plb.9.1652087660577; Mon, 09 May 2022 02:14:20 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.19 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:20 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 07/10] iio: accel: adxl345: Drop comma in terminator entries Date: Mon, 9 May 2022 17:14:03 +0800 Message-Id: <20220509091406.39552-8-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Shevchenko BugLink: https://launchpad.net/bugs/1962674 Terminator entries are by definition should terminate the array. Dropping comma make this enforced at compile time. Signed-off-by: Andy Shevchenko Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220222090009.2060-7-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit b8f83abdd2dd5bb71a0ffb62dbd3fbfdcf9d79f7) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345_core.c | 2 +- drivers/iio/accel/adxl345_i2c.c | 2 +- drivers/iio/accel/adxl345_spi.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/iio/accel/adxl345_core.c b/drivers/iio/accel/adxl345_core.c index f69141be7348..fabbeec4ae75 100644 --- a/drivers/iio/accel/adxl345_core.c +++ b/drivers/iio/accel/adxl345_core.c @@ -195,7 +195,7 @@ static IIO_CONST_ATTR_SAMP_FREQ_AVAIL( static struct attribute *adxl345_attrs[] = { &iio_const_attr_sampling_frequency_available.dev_attr.attr, - NULL, + NULL }; static const struct attribute_group adxl345_attrs_group = { diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c index 90f471add84c..c24f66690b6f 100644 --- a/drivers/iio/accel/adxl345_i2c.c +++ b/drivers/iio/accel/adxl345_i2c.c @@ -41,7 +41,7 @@ MODULE_DEVICE_TABLE(i2c, adxl345_i2c_id); static const struct of_device_id adxl345_of_match[] = { { .compatible = "adi,adxl345", .data = (const void *)ADXL345 }, { .compatible = "adi,adxl375", .data = (const void *)ADXL375 }, - { }, + { } }; MODULE_DEVICE_TABLE(of, adxl345_of_match); diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index 3943c71db77a..899a8a000823 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -47,7 +47,7 @@ MODULE_DEVICE_TABLE(spi, adxl345_spi_id); static const struct of_device_id adxl345_of_match[] = { { .compatible = "adi,adxl345", .data = (const void *)ADXL345 }, { .compatible = "adi,adxl375", .data = (const void *)ADXL375 }, - { }, + { } }; MODULE_DEVICE_TABLE(of, adxl345_of_match); From patchwork Mon May 9 09:14:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628428 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=mn71E/5K; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8s3fLZz9sGJ for ; Mon, 9 May 2022 19:14:37 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzTJ-0001gm-2l; Mon, 09 May 2022 09:14:29 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzTE-0001aP-NJ for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:24 +0000 Received: from mail-pl1-f198.google.com (mail-pl1-f198.google.com [209.85.214.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 14A2E3F221 for ; Mon, 9 May 2022 09:14:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087664; bh=NPWn25kCQAfMdXOAHXeP2XxO95mWW6BnCMunIIilD1A=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=mn71E/5Ko9dyLcXQyR/UYBk6UV7eSudiuHpghLV0C98mi6xsSxckp1kdOWtS2gpAT P4S4/AAhCORVxEWT+JaXMwE0tBapw6X42AFY0v32rxFZakpNwT/9DKzd90POTT4TA4 8CohWYl94NeCKuA3y4jocXH+ky9CKnKDvyvPZej3iPkXlF9pnaFdeQbLL+N6GVAmjw JERZ7Irub33SVaQtw4Br6IrNshDBN2Ju0xglcWCRgTsgEyvOFot0Bd05ypTOjqfLnv E4dk/6V8iwsQbUaIgiEbrSC6on+/WkWVPTkBrlp33ZwzjqbQaxGSzjzBwfyr1SAS4v A7BE1MExs9fMw== Received: by mail-pl1-f198.google.com with SMTP id x23-20020a170902b41700b0015ea144789fso7998425plr.13 for ; Mon, 09 May 2022 02:14:24 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=NPWn25kCQAfMdXOAHXeP2XxO95mWW6BnCMunIIilD1A=; b=exN3ZQh8uQF3tT6ccoFOLkO+Mi4257MjaVg746hZS4SvUpVySi7phv1BGKMu08ZxZV ZvAJjcfsfzoZHzoTlZAS130qFMLfeOhtWNlotQdqQSxOTGZbvo5HGBKFnLEigiSg+kXF jHyl1Lpl8hfj3n5Q64n6q2//2oyYgMfbNfTn4SXUhgivApIBpUxrjNzvbhq5q2evnSg7 90l9uMY7IfGnV3VzsGaHdNa3IGWb/On4P5eaNuNPthAjoW8LZYzzBkmoagwgZ3TT+zdn KPRMbwznz0Qga6WiugPbmfaCjUZ3YHTkuo9MeABvcJgh01WnvZBXEJioYFBUvqntqUu0 GyiA== X-Gm-Message-State: AOAM530Nn536qj4tIXOlWFu3LVPaIOMZ8kto7gejhfGtDq5T0c2PaL8S SssXUuiaCpZsaAPBPD3kfAA0xQZQWRpL0UFsL3yWjENxJ3weq73Ngb5+ATgaO8wAEUVUKX4iicA +xQNC2CTu0+8lPixAu3VpBVNPeCpBO4uXVEearzE5rA== X-Received: by 2002:a17:902:70cb:b0:158:424e:a657 with SMTP id l11-20020a17090270cb00b00158424ea657mr15365130plt.6.1652087662663; Mon, 09 May 2022 02:14:22 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzNEC0mlRLG/e4dYyChg6+By9aEgDH0zwDuQwJbLB8KusIkeXJBe+HpZkuPmxQkmzTev+sJ5A== X-Received: by 2002:a17:902:70cb:b0:158:424e:a657 with SMTP id l11-20020a17090270cb00b00158424ea657mr15365102plt.6.1652087662120; Mon, 09 May 2022 02:14:22 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.20 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:21 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 08/10] iio: accel: adxl345: Remove unneeded blank lines Date: Mon, 9 May 2022 17:14:04 +0800 Message-Id: <20220509091406.39552-9-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Andy Shevchenko BugLink: https://launchpad.net/bugs/1962674 Remove unneeded blank lines where they separate the data type definitions and the macros which are using them. Signed-off-by: Andy Shevchenko Tested-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220222090009.2060-8-andriy.shevchenko@linux.intel.com Signed-off-by: Jonathan Cameron (cherry picked from commit 4781f3e0e6cadf332f49f723ba820f35960a058d) Signed-off-by: Jian Hui Lee --- drivers/iio/accel/adxl345_i2c.c | 3 --- drivers/iio/accel/adxl345_spi.c | 3 --- 2 files changed, 6 deletions(-) diff --git a/drivers/iio/accel/adxl345_i2c.c b/drivers/iio/accel/adxl345_i2c.c index c24f66690b6f..fc8b7576e81e 100644 --- a/drivers/iio/accel/adxl345_i2c.c +++ b/drivers/iio/accel/adxl345_i2c.c @@ -35,7 +35,6 @@ static const struct i2c_device_id adxl345_i2c_id[] = { { "adxl375", ADXL375 }, { } }; - MODULE_DEVICE_TABLE(i2c, adxl345_i2c_id); static const struct of_device_id adxl345_of_match[] = { @@ -43,7 +42,6 @@ static const struct of_device_id adxl345_of_match[] = { { .compatible = "adi,adxl375", .data = (const void *)ADXL375 }, { } }; - MODULE_DEVICE_TABLE(of, adxl345_of_match); static const struct acpi_device_id adxl345_acpi_match[] = { @@ -62,7 +60,6 @@ static struct i2c_driver adxl345_i2c_driver = { .probe_new = adxl345_i2c_probe, .id_table = adxl345_i2c_id, }; - module_i2c_driver(adxl345_i2c_driver); MODULE_AUTHOR("Eva Rachel Retuya "); diff --git a/drivers/iio/accel/adxl345_spi.c b/drivers/iio/accel/adxl345_spi.c index 899a8a000823..93bd169cbafe 100644 --- a/drivers/iio/accel/adxl345_spi.c +++ b/drivers/iio/accel/adxl345_spi.c @@ -41,7 +41,6 @@ static const struct spi_device_id adxl345_spi_id[] = { { "adxl375", ADXL375 }, { } }; - MODULE_DEVICE_TABLE(spi, adxl345_spi_id); static const struct of_device_id adxl345_of_match[] = { @@ -49,7 +48,6 @@ static const struct of_device_id adxl345_of_match[] = { { .compatible = "adi,adxl375", .data = (const void *)ADXL375 }, { } }; - MODULE_DEVICE_TABLE(of, adxl345_of_match); static const struct acpi_device_id adxl345_acpi_match[] = { @@ -67,7 +65,6 @@ static struct spi_driver adxl345_spi_driver = { .probe = adxl345_spi_probe, .id_table = adxl345_spi_id, }; - module_spi_driver(adxl345_spi_driver); MODULE_AUTHOR("Eva Rachel Retuya "); From patchwork Mon May 9 09:14:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628430 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=oUWFA+AO; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb8z0VmWz9sGJ for ; Mon, 9 May 2022 19:14:43 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzTO-0001qY-Fe; Mon, 09 May 2022 09:14:34 +0000 Received: from smtp-relay-internal-1.internal ([10.131.114.114] helo=smtp-relay-internal-1.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzTG-0001cP-1v for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:26 +0000 Received: from mail-pf1-f197.google.com (mail-pf1-f197.google.com [209.85.210.197]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-1.canonical.com (Postfix) with ESMTPS id 4D4653F1CA for ; Mon, 9 May 2022 09:14:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087665; bh=jJw+r4lI39sV79ePkrCzBJvm42jjbupPKLPVLDld9uA=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=oUWFA+AOdQRsCRbxfIxOvox1TnatabDos47X3JkLFLb9YIMX22CjXOP828gLBxunV 6zy0ZLSxUJLyTgnsK24BLYILjQeZRmOhbUzmolz7VGa9Qq8eoy1oU1F24AizxhPiPJ x1pIB5KVVeuO00dGTuO9dGhYd+/Tz0QClVpDz0FOqwM780A/oLr1gRx3QjTFO3vZKp oYJKyO3n/a+xuMFj2Fewq5MF8lZqBiHG2K2Q+31qPPqxLJ4hNi0Nqo9lIkCEiBlwMM jbsTmHBkPtcrPzp5GcMeGAbtMlzBWMkvZnUmbpGp9VuyBrid5RX8OCQDyOdHJlH5/z ZFHro2avGx1Zg== Received: by mail-pf1-f197.google.com with SMTP id x16-20020aa793b0000000b0050d3d5c4f4eso4455248pff.6 for ; Mon, 09 May 2022 02:14:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=jJw+r4lI39sV79ePkrCzBJvm42jjbupPKLPVLDld9uA=; b=Sn/KMWBxuQfXKq8+5HL05TcyA27Kz43DH0en7+Dz/RLFYm5mSKSZ0J0hlkvpyt0o90 gHLQlcHYuQTwpqGRwVmka8JhLgqc6BKmoOG66zR3TTbWfjhrDivUrA6m/k4f0BOkzkJX CvheHsj4P2gAKgzuqTnH5OXoZ2FVSDpTiy7EBMo/51gBQLzo/kuNe+9OYy2v7xITa/KV yE1h8QS7R2fc4xLDY5sMrjSfNu7MHQjpfOs0eVDWmTKZk2/YGzmpr5iqcQcCeFDPdUWq t2PpCZ6cCmNq70pga2EpZPS38hM1KOioTmBhrHYGVRH1FRR5TknrZ7ZCpdUviNNF0t7q BHdA== X-Gm-Message-State: AOAM530jtDQ2WzvVo8gTWI3bFgxUqxdm04zbyfrBrHELUbZezJUF4u4K yVhaq+g/SGX1LaMUykwaKgNCUs6kxpVVoKRHJnYSAAN1Y18bDCu1sFT8p5ymnzyVeAIgsyzCIeR o+bur++jjN17KpyV23YRIDPCtUQ5D1h5QbC8z0t1qaw== X-Received: by 2002:a63:570f:0:b0:39d:2648:261d with SMTP id l15-20020a63570f000000b0039d2648261dmr12085367pgb.551.1652087663999; Mon, 09 May 2022 02:14:23 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyUpj9GROyHkKZ4qQhV/hoYwauPdUUC9k7HhqNG7MOuy6426HH0pRl7f+nswGp+vhsg/XCTmg== X-Received: by 2002:a63:570f:0:b0:39d:2648:261d with SMTP id l15-20020a63570f000000b0039d2648261dmr12085357pgb.551.1652087663733; Mon, 09 May 2022 02:14:23 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.22 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:23 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 09/10] iio: humidity: hdc100x: Add ACPI HID table Date: Mon, 9 May 2022 17:14:05 +0800 Message-Id: <20220509091406.39552-10-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Kai-Heng Feng BugLink: https://launchpad.net/bugs/1962674 x86 boards may use ACPI HID "TXNW1010" for the hdc100x device. TI told us "The ACPI ID for TI is: https://uefi.org/node/1028 (TXNW), therefore it would most likely be appropriate to use TXNW1010." So add an ACPI match table for that accordingly. Signed-off-by: Kai-Heng Feng Reviewed-by: Andy Shevchenko Link: https://lore.kernel.org/r/20220128042054.2062060-1-kai.heng.feng@canonical.com Signed-off-by: Jonathan Cameron (cherry picked from commit 711b6a3f4af137c4a7f759136ccd50d455095b95) Signed-off-by: Jian Hui Lee --- drivers/iio/humidity/hdc100x.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/humidity/hdc100x.c b/drivers/iio/humidity/hdc100x.c index 9e0fce917ce4..47f8e8ef56d6 100644 --- a/drivers/iio/humidity/hdc100x.c +++ b/drivers/iio/humidity/hdc100x.c @@ -417,10 +417,17 @@ static const struct of_device_id hdc100x_dt_ids[] = { }; MODULE_DEVICE_TABLE(of, hdc100x_dt_ids); +static const struct acpi_device_id hdc100x_acpi_match[] = { + { "TXNW1010" }, + { } +}; +MODULE_DEVICE_TABLE(acpi, hdc100x_acpi_match); + static struct i2c_driver hdc100x_driver = { .driver = { .name = "hdc100x", .of_match_table = hdc100x_dt_ids, + .acpi_match_table = hdc100x_acpi_match, }, .probe = hdc100x_probe, .id_table = hdc100x_id, From patchwork Mon May 9 09:14:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jian Hui Lee X-Patchwork-Id: 1628431 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=canonical.com header.i=@canonical.com header.a=rsa-sha256 header.s=20210705 header.b=C/JyexWA; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.ubuntu.com (client-ip=91.189.94.19; helo=huckleberry.canonical.com; envelope-from=kernel-team-bounces@lists.ubuntu.com; receiver=) Received: from huckleberry.canonical.com (huckleberry.canonical.com [91.189.94.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4Kxb906YyQz9sGJ for ; Mon, 9 May 2022 19:14:44 +1000 (AEST) Received: from localhost ([127.0.0.1] helo=huckleberry.canonical.com) by huckleberry.canonical.com with esmtp (Exim 4.86_2) (envelope-from ) id 1nnzTR-0001zP-Ka; Mon, 09 May 2022 09:14:37 +0000 Received: from smtp-relay-internal-0.internal ([10.131.114.225] helo=smtp-relay-internal-0.canonical.com) by huckleberry.canonical.com with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.86_2) (envelope-from ) id 1nnzTH-0001dx-L6 for kernel-team@lists.ubuntu.com; Mon, 09 May 2022 09:14:27 +0000 Received: from mail-pg1-f198.google.com (mail-pg1-f198.google.com [209.85.215.198]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by smtp-relay-internal-0.canonical.com (Postfix) with ESMTPS id 040CE3F85D for ; Mon, 9 May 2022 09:14:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=canonical.com; s=20210705; t=1652087666; bh=JV+XKGGQMLwF//maWEaXuYj2J5HqKKmnqJegq7RnoBY=; h=From:To:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=C/JyexWAUCJz2hdgBH0hpfdgfm2lOslsipGqquz804WxfGp6MjQd3e8aUrgJV9HrN p7l7jXpTJca6+6sRpse4Gv18CqyUR8KLloe5BJzz4UQjkgOI+/rO6elCo50chT5dkl GLQfv/KkT/zQjumaLAPxPX4GrAJvmfUpJQ0Js9jNl2mYXEt94Ewx+hvH3RCrIRseU1 wNiMsM914UDu42bRbn67px59pO2vK60eVy/CItPSepdSwVGQ7O67H5Is5R7+f8gW+x p1tWhNuv7y4PqOE527VffI99aHXXZt6+hl0DCZsOAHB3hPQ4f8RdhZFrnLPxWvJNi0 9czbCSrqw6vzw== Received: by mail-pg1-f198.google.com with SMTP id r190-20020a632bc7000000b003c6222b2192so5504991pgr.11 for ; Mon, 09 May 2022 02:14:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=JV+XKGGQMLwF//maWEaXuYj2J5HqKKmnqJegq7RnoBY=; b=ih56Iqxn9dzhfWoIUAHZjv9Q55fsbGjsJQOQGa0n7yUxSh1ljaHwu3cpephaH8uWxD zEKM3e08g8x2DrbHeFgPTbB9BRF8nMVa7TNTf0JV1T3/OH9z6VT/TUftWBOBj4ZnFEwY 7UDxuBYp8Ua6p9WQGxj0b+oIhlBMhGr1haVFoSqFNAqZS/UWg3LH+PZV6QRzrDghhS/U XMVyFxkrQc6VC/EUqHe7xyDJLCyWm07hGTdBFKzOKCbzgXuvrevP15LkHJHVPo0OYLDX qH8wsgTQHum29PdAQaXQBvEQHLS65c4aL8Q6OWYzDj+/qMqVSq9bXtoPeC/bgSRszf1m mTgg== X-Gm-Message-State: AOAM530FyHzadM+It4qjbf+VJO6PxoLyGRwNcmslH1GwmdtXkCx/JRyU VGpGzIW3XVUxbBU1I+Zm9W4Wo5klUcAEKfeYgVmBJUWGLjPACZcGIqZAtjuuI/KT/Z66ddeOGHg jqEx6ydMtUihbDI4U/H0Ja57I4cAytIosIx5OX7Oi9A== X-Received: by 2002:a17:902:ea11:b0:15e:ae19:f36a with SMTP id s17-20020a170902ea1100b0015eae19f36amr15368404plg.52.1652087665508; Mon, 09 May 2022 02:14:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyfoivCO7F36d7pbg9XpVER2PO8QKWdVwmtA8mfnTEJiO6bBjl9KtMLoChpZHW9wy83klj5vg== X-Received: by 2002:a17:902:ea11:b0:15e:ae19:f36a with SMTP id s17-20020a170902ea1100b0015eae19f36amr15368386plg.52.1652087665242; Mon, 09 May 2022 02:14:25 -0700 (PDT) Received: from Razer-Stealth.. (36-230-106-94.dynamic-ip.hinet.net. [36.230.106.94]) by smtp.gmail.com with ESMTPSA id r1-20020a170902c7c100b0015e8d4eb2e9sm6437057pla.307.2022.05.09.02.14.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 09 May 2022 02:14:24 -0700 (PDT) From: Jian Hui Lee To: kernel-team@lists.ubuntu.com Subject: [SRU][Focal:linux-intel-iotg-5.15][PATCH 10/10] iio: pressure: dps310: Add ACPI HID table Date: Mon, 9 May 2022 17:14:06 +0800 Message-Id: <20220509091406.39552-11-jianhui.lee@canonical.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220509091406.39552-1-jianhui.lee@canonical.com> References: <20220509091406.39552-1-jianhui.lee@canonical.com> MIME-Version: 1.0 X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.20 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: kernel-team-bounces@lists.ubuntu.com Sender: "kernel-team" From: Kai-Heng Feng BugLink: https://launchpad.net/bugs/1962674 x86 boards may use ACPI HID "IFX3100" for the dps310 device. Vendor told us feel free to add the ID and contact "Saumitra.Chafekar@infineon.com" for further questions. So add an ACPI match table for that accordingly. Reviewed-by: Andy Shevchenko Signed-off-by: Kai-Heng Feng Link: https://lore.kernel.org/r/20220128023144.2050615-1-kai.heng.feng@canonical.com Signed-off-by: Jonathan Cameron (cherry picked from commit 72ff282819d0526d3e4417c2a61414557981b5af) Signed-off-by: Jian Hui Lee --- drivers/iio/pressure/dps310.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/iio/pressure/dps310.c b/drivers/iio/pressure/dps310.c index 0730380ceb69..36fb7ae0d0a9 100644 --- a/drivers/iio/pressure/dps310.c +++ b/drivers/iio/pressure/dps310.c @@ -812,9 +812,16 @@ static const struct i2c_device_id dps310_id[] = { }; MODULE_DEVICE_TABLE(i2c, dps310_id); +static const struct acpi_device_id dps310_acpi_match[] = { + { "IFX3100" }, + {} +}; +MODULE_DEVICE_TABLE(acpi, dps310_acpi_match); + static struct i2c_driver dps310_driver = { .driver = { .name = DPS310_DEV_NAME, + .acpi_match_table = dps310_acpi_match, }, .probe = dps310_probe, .id_table = dps310_id,