From patchwork Fri Jun 11 17:13:43 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316287 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 034FEC48BE0 for ; Fri, 11 Jun 2021 17:12:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D8EA26124C for ; Fri, 11 Jun 2021 17:12:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231514AbhFKROK (ORCPT ); Fri, 11 Jun 2021 13:14:10 -0400 Received: from mail.kernel.org ([198.145.29.99]:60530 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231490AbhFKROJ (ORCPT ); Fri, 11 Jun 2021 13:14:09 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E2A2F613D0; Fri, 11 Jun 2021 17:12:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431531; bh=TPqFEd2IN1Da5sF1EtgEHgRRtvpoNF7ySi5QwPoy340=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qrTS+X30E6yIpfATRkmIc9qodHvBwvvFirlTH7TeWyVyfkBbHvA4/dus4mrzjKT+q OzEWdt62O2kMdlKQJ9GOYWGYepT+5jZ+DrBeU3IlsWF1tn80Yv4eNDLGrLEoA6uh3D Lc5hmpxosVLrkJtvyJzWS5qNkE+Ye7cemyPDpFi3ipAc6HcghyZ2klfvZhgWKAF85E RaZBOUHWhVriXvQs1qKhwk/6ST8vUJf3yeK2PaoNgh3YhTyw64PwQJvWq+j/+iTjDH fzt/muRlCgxVJ2qaBn+PBt2sOOZ6fVD0MBCdWqMykcIPER3b89xpktAxeT1q/WkIo5 jXvR8gaIKAydQ== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Lars-Peter Clausen , Michael Hennerich Subject: [PATCH 01/12] iio:accel:adxl372: Cleanup includes Date: Fri, 11 Jun 2021 18:13:43 +0100 Message-Id: <20210611171355.202903-2-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of include-what-you-use. Drop some unused headers and include others that should probably be there based on direct use. Also a few forward definitions to avoid any potential future include ordering issues. Signed-off-by: Jonathan Cameron Cc: Lars-Peter Clausen Cc: Michael Hennerich Acked-by:  Lars-Peter Clausen --- drivers/iio/accel/adxl372.c | 4 ++-- drivers/iio/accel/adxl372.h | 2 ++ drivers/iio/accel/adxl372_spi.c | 3 +-- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/drivers/iio/accel/adxl372.c b/drivers/iio/accel/adxl372.c index fc9592407717..c679cb9f3ed1 100644 --- a/drivers/iio/accel/adxl372.c +++ b/drivers/iio/accel/adxl372.c @@ -6,12 +6,12 @@ */ #include +#include #include #include -#include #include +#include #include -#include #include #include diff --git a/drivers/iio/accel/adxl372.h b/drivers/iio/accel/adxl372.h index 80a0aa9714fc..86bf8955d60c 100644 --- a/drivers/iio/accel/adxl372.h +++ b/drivers/iio/accel/adxl372.h @@ -9,6 +9,8 @@ #define _ADXL372_H_ #define ADXL372_REVID 0x03 +struct device; +struct regmap; int adxl372_probe(struct device *dev, struct regmap *regmap, int irq, const char *name); diff --git a/drivers/iio/accel/adxl372_spi.c b/drivers/iio/accel/adxl372_spi.c index 1f1352fee99a..927379f9b497 100644 --- a/drivers/iio/accel/adxl372_spi.c +++ b/drivers/iio/accel/adxl372_spi.c @@ -6,9 +6,8 @@ */ #include +#include #include -#include -#include #include #include "adxl372.h" From patchwork Fri Jun 11 17:13:44 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316289 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id CDFD1C48BE5 for ; Fri, 11 Jun 2021 17:12:14 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id ADD74613DF for ; Fri, 11 Jun 2021 17:12:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230462AbhFKROM (ORCPT ); Fri, 11 Jun 2021 13:14:12 -0400 Received: from mail.kernel.org ([198.145.29.99]:60544 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhFKROL (ORCPT ); Fri, 11 Jun 2021 13:14:11 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2CCC2613D3; Fri, 11 Jun 2021 17:12:11 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431533; bh=Bor6MdOhk4NxRancSRh1CNhzkAeiiPyTTJF3RyUXjv4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Hf8WCR8KkGjj8OB+wqzn8oVJEjzo66dfbnKwM+qpiTcZ+mLZDZoxSKdhuhwgBWLOc 9bFRzwIhGIY3Q02+F/Fj00A+Q0JinPSMn7rLMN3pGsKztptsAbrBSMQjx2BZZPmD4m fgrfUGKfTZxIYVJxxcTH2bJeteqXOHq+31ZHisIYA5tn1Y8w/t/VNzHPS1qghEXhAa NaD27zfAfd4NavRf1hgGD6yaA0XOzJWk9uvDyGS1hwDYewOo3i4NOofpzYwUG/H9tb 3AQqQMXtoJFJOfNfazpMqwirx7jd8q5oQgZKYHjFBamQPOeSfhU71+Nj3goOn7C0dx M43eCxmnq8H6w== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Jonathan Bakker , Linus Walleij Subject: [PATCH 02/12] iio:accel:bma180: Use generic device properties. Date: Fri, 11 Jun 2021 18:13:44 +0100 Message-Id: <20210611171355.202903-3-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Whilst doing header cleanup I noticed this driver makes very superficial use of of_* interfaces. Hence move to the generic firmware forms. Signed-off-by: Jonathan Cameron Cc: Jonathan Bakker Cc: Linus Walleij Reviewed-by: Linus Walleij --- drivers/iio/accel/bma180.c | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 4a07e60c0e21..0e0d9317c084 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -17,8 +17,7 @@ #include #include #include -#include -#include +#include #include #include #include @@ -995,8 +994,8 @@ static int bma180_probe(struct i2c_client *client, data = iio_priv(indio_dev); i2c_set_clientdata(client, indio_dev); data->client = client; - if (client->dev.of_node) - chip = (enum chip_ids)of_device_get_match_data(dev); + if (dev_fwnode(dev)) + chip = (enum chip_ids)device_get_match_data(dev); else chip = id->driver_data; data->part_info = &bma180_part_info[chip]; From patchwork Fri Jun 11 17:13:45 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316291 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 72E25C48BD1 for ; Fri, 11 Jun 2021 17:12:16 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 559A8613E9 for ; Fri, 11 Jun 2021 17:12:16 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231431AbhFKRON (ORCPT ); Fri, 11 Jun 2021 13:14:13 -0400 Received: from mail.kernel.org ([198.145.29.99]:60554 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhFKRON (ORCPT ); Fri, 11 Jun 2021 13:14:13 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id C878E6124C; Fri, 11 Jun 2021 17:12:13 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431535; bh=9NSaJ82TbEOvGft3/X4heYLYiZbUwXl75lhxIszw4Vw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=dgphvJyuGXnskXmwJJen+2+U6PYd2fKh2FhWl7h1qp95+Wsq3lYxcRpDIeQyMgvCv 9/l3JaQyYIRgLcXnEXICELR3lGRZitRsDxZAKVVHG08dQFGNdR9qj6olg1UCign5I/ H8skjPK/fFciHtwaWSCEH3s/fe3csxGZtnM3ZTW5rn/a+Wi8k4CmWV5PP4duKZwTQO uk0GSE4Tk0CQPwZsTrhP+/3+yoqD2kkZaZGYv65HHnt6rQFuy4wPPXf8v4mzhC2C0c h6Ccc2cVeKTNHsoBb6PbA0RtwFKntSLlhU6gJPbGPzrQ0Kt8yzwgNJNppG82l5cLz/ LzPFDGgYsoVxg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Dan Robertson , Hans de Goede , Mike Looijmans , Linus Walleij , Andy Shevchenko Subject: [PATCH 03/12] iio:accel:bosch drivers: Cleanup includes Date: Fri, 11 Jun 2021 18:13:45 +0100 Message-Id: <20210611171355.202903-4-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use tool. Remove unused headers and add some that are directly used in the files. There are no hard rules on when to use direct includes and when to rely on a chain of headers. Here I'm trying to make those decisions approximately the same across IIO. Signed-off-by: Jonathan Cameron Cc: Dan Robertson Cc: Hans de Goede Cc: Mike Looijmans Cc: Linus Walleij Cc: Andy Shevchenko --- drivers/iio/accel/bma180.c | 4 ++-- drivers/iio/accel/bma220_spi.c | 2 +- drivers/iio/accel/bma400_core.c | 1 - drivers/iio/accel/bma400_spi.c | 1 - drivers/iio/accel/bmc150-accel-core.c | 1 + drivers/iio/accel/bmc150-accel-spi.c | 1 - drivers/iio/accel/bmi088-accel-core.c | 3 --- drivers/iio/accel/bmi088-accel-spi.c | 3 ++- 8 files changed, 6 insertions(+), 10 deletions(-) diff --git a/drivers/iio/accel/bma180.c b/drivers/iio/accel/bma180.c index 0e0d9317c084..2042cf86b199 100644 --- a/drivers/iio/accel/bma180.c +++ b/drivers/iio/accel/bma180.c @@ -14,14 +14,14 @@ */ #include +#include #include #include #include #include +#include #include #include -#include -#include #include #include #include diff --git a/drivers/iio/accel/bma220_spi.c b/drivers/iio/accel/bma220_spi.c index 0622c7936499..c447463d0844 100644 --- a/drivers/iio/accel/bma220_spi.c +++ b/drivers/iio/accel/bma220_spi.c @@ -9,11 +9,11 @@ #include #include #include +#include #include #include #include -#include #include #include diff --git a/drivers/iio/accel/bma400_core.c b/drivers/iio/accel/bma400_core.c index 21520e022a21..8595dd666c44 100644 --- a/drivers/iio/accel/bma400_core.c +++ b/drivers/iio/accel/bma400_core.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/iio/accel/bma400_spi.c b/drivers/iio/accel/bma400_spi.c index 7c2825904e08..0ae3d1a203b4 100644 --- a/drivers/iio/accel/bma400_spi.c +++ b/drivers/iio/accel/bma400_spi.c @@ -6,7 +6,6 @@ * */ #include -#include #include #include #include diff --git a/drivers/iio/accel/bmc150-accel-core.c b/drivers/iio/accel/bmc150-accel-core.c index 46ab7675186c..06e396b66e02 100644 --- a/drivers/iio/accel/bmc150-accel-core.c +++ b/drivers/iio/accel/bmc150-accel-core.c @@ -18,6 +18,7 @@ #include #include #include +#include #include #include #include diff --git a/drivers/iio/accel/bmc150-accel-spi.c b/drivers/iio/accel/bmc150-accel-spi.c index 74a8aee4f612..0786c9a0dcbb 100644 --- a/drivers/iio/accel/bmc150-accel-spi.c +++ b/drivers/iio/accel/bmc150-accel-spi.c @@ -4,7 +4,6 @@ * Copyright © 2015 Pengutronix, Markus Pargmann */ -#include #include #include #include diff --git a/drivers/iio/accel/bmi088-accel-core.c b/drivers/iio/accel/bmi088-accel-core.c index a06dae5c971d..d50db25cce64 100644 --- a/drivers/iio/accel/bmi088-accel-core.c +++ b/drivers/iio/accel/bmi088-accel-core.c @@ -8,13 +8,10 @@ #include #include -#include -#include #include #include #include #include -#include #include #include "bmi088-accel.h" diff --git a/drivers/iio/accel/bmi088-accel-spi.c b/drivers/iio/accel/bmi088-accel-spi.c index dd1e3f6cf211..ae999c08e038 100644 --- a/drivers/iio/accel/bmi088-accel-spi.c +++ b/drivers/iio/accel/bmi088-accel-spi.c @@ -6,9 +6,10 @@ * Copyright (c) 2018-2020, Topic Embedded Products */ +#include #include +#include #include -#include #include #include "bmi088-accel.h" From patchwork Fri Jun 11 17:13:46 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316293 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 28343C48BE0 for ; Fri, 11 Jun 2021 17:12:17 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 10967613F1 for ; Fri, 11 Jun 2021 17:12:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231344AbhFKROO (ORCPT ); Fri, 11 Jun 2021 13:14:14 -0400 Received: from mail.kernel.org ([198.145.29.99]:60566 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhFKROO (ORCPT ); Fri, 11 Jun 2021 13:14:14 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 816CC613DF; Fri, 11 Jun 2021 17:12:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431536; bh=WJHMBM4T9UOF5tTQKoW6YGEjcHubXL/EgoTZGE5ik0E=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=lO8QHwG8tFLrLb1liqMQlpfnpSwCVBjgryR1LZ3levi6jhE3pAOrXKFFJXWOM9UM5 8y3kg58fixDPqqUDrTFoOHFjn5nc9DdBl2QOh5smZGbFiwlKq3LAliZ8EfUflR5All 7o7AbXAPYvLkmPSee4FUfUp4fEwX4ofgBH+Gz7qnHtY4tIxVaXsLkE8nvVLpp82DMI TVBVCoTCPBtlbVaawNMJuifl2zDugWctADFGWDXBHmYTpkC+osHTEh0jAznftSNZ8Q iTWEffPldhOs6z9xVci/mjnAOg/jIUInT2gnfxUpMoFxLGwiXLUwjm8lMTxrJ0Jf8g z9BfPnUlN56cg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 04/12] iio:accel:miramems drivers: Cleanup headers Date: Fri, 11 Jun 2021 18:13:46 +0100 Message-Id: <20210611171355.202903-5-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use tool. Drop unused headers and include some that are directly used inside the files. Signed-off-by: Jonathan Cameron --- drivers/iio/accel/da280.c | 3 +-- drivers/iio/accel/da311.c | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/drivers/iio/accel/da280.c b/drivers/iio/accel/da280.c index 5edff9ba72da..0fb20dbde49b 100644 --- a/drivers/iio/accel/da280.c +++ b/drivers/iio/accel/da280.c @@ -7,11 +7,10 @@ */ #include +#include #include #include #include -#include -#include #define DA280_REG_CHIP_ID 0x01 #define DA280_REG_ACC_X_LSB 0x02 diff --git a/drivers/iio/accel/da311.c b/drivers/iio/accel/da311.c index 92593a1cd1aa..c944e18c97f0 100644 --- a/drivers/iio/accel/da311.c +++ b/drivers/iio/accel/da311.c @@ -6,11 +6,11 @@ * Copyright (c) 2011-2013 MiraMEMS Sensing Technology Co., Ltd. */ +#include #include +#include #include #include -#include -#include #define DA311_CHIP_ID 0x13 From patchwork Fri Jun 11 17:13:47 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316295 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 83DA7C48BE5 for ; Fri, 11 Jun 2021 17:12:18 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6C5FD613F5 for ; Fri, 11 Jun 2021 17:12:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231447AbhFKROP (ORCPT ); Fri, 11 Jun 2021 13:14:15 -0400 Received: from mail.kernel.org ([198.145.29.99]:60578 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230186AbhFKROP (ORCPT ); Fri, 11 Jun 2021 13:14:15 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 76F23613E9; Fri, 11 Jun 2021 17:12:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431537; bh=A+lbXcqxH4WuaYciOdHNZSt65MQry63DGvw7a4M0naI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=H6zk83Zw7i0vD6c7i8X3xav8r+tLNQqspLPk8fGd8UiJigftslb3mW2CrFkAW1GgK 59/Kt9BFT2w1+2I1ZE1opV6wMq/3TMLuhWns5wW/WaLSX1wvKCvFNgF4D7afzMz7i5 sINokLudzkSaQg7OAJwM7xEOC/N6mUe9+FbMjtccdY9kXDSg1nYwTueZZyHcvEtwaA 6CAjI6Gih5/VUvsNqYFzxakQtILvH2pP079U14ZIt7lJFKcK1dl0TpaC2voJCHMsFi LNcEf7khMgwRsTmR06klYhXxeA+F1kQijd7Hhszu1D7LFPBJghaRzaA0gYZGLgTi2d fgf8yF3yHXOfA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Hans de Goede , Jelle van der Waa , Aleksei Mamlin Subject: [PATCH 05/12] iio:accel:domintech: Cleanup includes. Date: Fri, 11 Jun 2021 18:13:47 +0100 Message-Id: <20210611171355.202903-6-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use tool. In this case, mostly additions of includes. A lot of this is about consistency across IIO rather than them being strictly required. Signed-off-by: Jonathan Cameron Cc: Hans de Goede Cc: Jelle van der Waa Cc: Aleksei Mamlin --- drivers/iio/accel/dmard06.c | 4 +++- drivers/iio/accel/dmard09.c | 2 ++ drivers/iio/accel/dmard10.c | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/drivers/iio/accel/dmard06.c b/drivers/iio/accel/dmard06.c index de2868c28d95..6edc474f51c1 100644 --- a/drivers/iio/accel/dmard06.c +++ b/drivers/iio/accel/dmard06.c @@ -5,9 +5,11 @@ * Copyright (C) 2016 Aleksei Mamlin */ +#include +#include +#include #include #include -#include #include #define DMARD06_DRV_NAME "dmard06" diff --git a/drivers/iio/accel/dmard09.c b/drivers/iio/accel/dmard09.c index e6e28c964777..9155b3a232f4 100644 --- a/drivers/iio/accel/dmard09.c +++ b/drivers/iio/accel/dmard09.c @@ -6,7 +6,9 @@ */ #include +#include #include +#include #include #include diff --git a/drivers/iio/accel/dmard10.c b/drivers/iio/accel/dmard10.c index e84bf8db1e89..c928c67c0857 100644 --- a/drivers/iio/accel/dmard10.c +++ b/drivers/iio/accel/dmard10.c @@ -7,9 +7,9 @@ */ #include +#include #include #include -#include #include #define DMARD10_REG_ACTR 0x00 From patchwork Fri Jun 11 17:13:48 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316297 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E6D27C48BE0 for ; Fri, 11 Jun 2021 17:12:19 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D0313613F9 for ; Fri, 11 Jun 2021 17:12:19 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230186AbhFKROR (ORCPT ); Fri, 11 Jun 2021 13:14:17 -0400 Received: from mail.kernel.org ([198.145.29.99]:60590 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbhFKROQ (ORCPT ); Fri, 11 Jun 2021 13:14:16 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id E042D613D3; Fri, 11 Jun 2021 17:12:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431538; bh=hl3Ok/tYQp59dkkTwxSpbiLqgXO2JvZYu3kH1tt6dd4=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d+lDVrySOHr0SMTr5eVeUaVs8URjxYXp7cmYSMn0HrDht4YoTbqzSxRRitjyV7HpD /M4PW96nhKGr0J6p/FN7TLYRIMjh+w4BctraD4s+GalABoEqsJGXk5CO9cfj4Gq7oc KHxW7itua/6UtRP5e8WeSJFCB3TK8uEI+Q2UEr5RsEkJSMBuEIiv3IclRgjjU6bZCW WANKohsUlDhfZqgWYbVtAQkzp9TIOqu14+Hkaw3Bi5lra0WCtpvj0F4KOXCKBEzY5T pYO4MEm/3wu+IIbUbL/i1YzZzaszj2tjW3pwZKHpafDz/fjurEV3fynFpOmH/SDB5B 2/TkvBlf68PHw== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Sean Nyekjaer Subject: [PATCH 06/12] iio:accel:fxls8962af: Add a few missing includes. Date: Fri, 11 Jun 2021 18:13:48 +0100 Message-Id: <20210611171355.202903-7-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use tool. Note that in this driver the main reason to do this is to ensure consistency across IIO. Signed-off-by: Jonathan Cameron Cc: Sean Nyekjaer Reviewed-by: Sean Nyekjaer --- drivers/iio/accel/fxls8962af-core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/iio/accel/fxls8962af-core.c b/drivers/iio/accel/fxls8962af-core.c index 078d87865fde..6882f082d581 100644 --- a/drivers/iio/accel/fxls8962af-core.c +++ b/drivers/iio/accel/fxls8962af-core.c @@ -15,16 +15,17 @@ #include #include #include +#include #include #include #include +#include #include #include #include #include #include -#include #include "fxls8962af.h" From patchwork Fri Jun 11 17:13:49 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316299 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id C0B20C48BD1 for ; Fri, 11 Jun 2021 17:12:21 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id A72ED613D0 for ; Fri, 11 Jun 2021 17:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230155AbhFKROT (ORCPT ); Fri, 11 Jun 2021 13:14:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:60596 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231448AbhFKROR (ORCPT ); Fri, 11 Jun 2021 13:14:17 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 08742613F5; Fri, 11 Jun 2021 17:12:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431539; bh=nGFd4vtJI4PTkpop3e8DLbZwAGfX81EDKSoGFbYLRJQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VeQQ/X+b2JfyTuZF+/8Wy2cMQdHWT/Whx4kHKzutJInORNbXaqdON+j01ZSRbmzry ZWDdBwxIejQetHv43Fk7+3NJa3Mu8YnklcSzoSF6fqEkIxDeLQkKSkgXi9xYDTgNsK wRo/a7JJyVYupTZFgRKQDCSTEInOWqx4rhaMjOoBL5wnHaKOQWp8fnzjZFziH4xxAD TsvWjQ0YBFGc5s6b3Ae/xA0RMcrTwRP0DYNMx4Ljw9Z1UoXPt1e0lHJDWzRF1qL3hI tuZR0CLg8iIuCrIAc2YMy3Jp01oWP25IJvVomFPiE+VeDb1UCLNowNlB5YlfMW6Eho K7ahLqd9+BX/w== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Hans de Goede Subject: [PATCH 07/12] iio:accel:kionix drivers: Cleanup includes Date: Fri, 11 Jun 2021 18:13:49 +0100 Message-Id: <20210611171355.202903-8-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of include-what-you-use Mixture of removing unused headers, adding some that are directly used from the code and a few forwards definitions to avoid any potential future issues with header ordering. Signed-off-by: Jonathan Cameron Cc: Hans de Goede --- drivers/iio/accel/kxcjk-1013.c | 4 +++- drivers/iio/accel/kxsd9-i2c.c | 3 --- drivers/iio/accel/kxsd9-spi.c | 5 +---- drivers/iio/accel/kxsd9.c | 1 - drivers/iio/accel/kxsd9.h | 2 ++ 5 files changed, 6 insertions(+), 9 deletions(-) diff --git a/drivers/iio/accel/kxcjk-1013.c b/drivers/iio/accel/kxcjk-1013.c index a51fdd3c9b5b..e4813706a52a 100644 --- a/drivers/iio/accel/kxcjk-1013.c +++ b/drivers/iio/accel/kxcjk-1013.c @@ -5,13 +5,15 @@ */ #include +#include #include #include #include +#include #include -#include #include #include +#include #include #include #include diff --git a/drivers/iio/accel/kxsd9-i2c.c b/drivers/iio/accel/kxsd9-i2c.c index b580d605f848..7e1d1158f80e 100644 --- a/drivers/iio/accel/kxsd9-i2c.c +++ b/drivers/iio/accel/kxsd9-i2c.c @@ -1,11 +1,8 @@ // SPDX-License-Identifier: GPL-2.0 -#include #include #include #include -#include #include -#include #include #include "kxsd9.h" diff --git a/drivers/iio/accel/kxsd9-spi.c b/drivers/iio/accel/kxsd9-spi.c index 7971ec1eeb7e..78a168d5b1fa 100644 --- a/drivers/iio/accel/kxsd9-spi.c +++ b/drivers/iio/accel/kxsd9-spi.c @@ -1,11 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only -#include #include -#include -#include #include #include -#include +#include #include #include "kxsd9.h" diff --git a/drivers/iio/accel/kxsd9.c b/drivers/iio/accel/kxsd9.c index bf7ed9e7d00f..3d15f590ed4a 100644 --- a/drivers/iio/accel/kxsd9.c +++ b/drivers/iio/accel/kxsd9.c @@ -14,7 +14,6 @@ #include #include #include -#include #include #include #include diff --git a/drivers/iio/accel/kxsd9.h b/drivers/iio/accel/kxsd9.h index 5e3ca212f5be..172b756eb901 100644 --- a/drivers/iio/accel/kxsd9.h +++ b/drivers/iio/accel/kxsd9.h @@ -4,6 +4,8 @@ #define KXSD9_STATE_RX_SIZE 2 #define KXSD9_STATE_TX_SIZE 2 +struct device; +struct regmap; int kxsd9_common_probe(struct device *dev, struct regmap *map, From patchwork Fri Jun 11 17:13:50 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316301 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 037DDC48BE0 for ; Fri, 11 Jun 2021 17:12:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id DED77613D0 for ; Fri, 11 Jun 2021 17:12:21 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231448AbhFKROT (ORCPT ); Fri, 11 Jun 2021 13:14:19 -0400 Received: from mail.kernel.org ([198.145.29.99]:60606 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhFKROS (ORCPT ); Fri, 11 Jun 2021 13:14:18 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 2218B613F1; Fri, 11 Jun 2021 17:12:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431540; bh=b78PFP+LhxMwH6lGUeQPufculG0n045jGtxjNoRIsVM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=NRDqyJfLKMJam9zPsly9edgMtz54cbh3INAo6Rtb2t8Flgzpr1sWVVZHCQeYB31P3 mMtQJinw5da0kkvPKTJ9ZnQStEqOQmWR901LoMw254u2TbuAvx3B0si1YVu/M73lqj lemc9s35DPOKfYK4V6ovIdE5F2oyZ0/xtwr3ZOFRsmBrI59nhpNQ1ySE7ClZCpZ31W ZrI3hShxo+wgetDOwxLtXDpEQjErgZ843l59NdMKLirqqsaDQVbJJ+KcgJ85qnBrPu GFCX81l0wv3evELPYUL6yJQxikXMnBtTCNHV1kFgPn3WxKL/k7xrWmye6+5HHOmc5u PHi6xbFiyq4Bg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Hans de Goede Subject: [PATCH 08/12] iio:accel:mc3220: Cleanup includes. Date: Fri, 11 Jun 2021 18:13:50 +0100 Message-Id: <20210611171355.202903-9-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of output of include-what-you-use. Drop iio/sysfs.h on basis we don't use anything in there in this driver and add mod_devicetable.h as I'm aiming for consistency on that across IIO. Signed-off-by: Jonathan Cameron Cc: Hans de Goede --- drivers/iio/accel/mc3230.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/iio/accel/mc3230.c b/drivers/iio/accel/mc3230.c index 735002b716f3..da0cb428d6e1 100644 --- a/drivers/iio/accel/mc3230.c +++ b/drivers/iio/accel/mc3230.c @@ -9,8 +9,8 @@ #include #include +#include #include -#include #define MC3230_REG_XOUT 0x00 #define MC3230_REG_YOUT 0x01 From patchwork Fri Jun 11 17:13:51 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316303 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 32E3DC48BE5 for ; Fri, 11 Jun 2021 17:12:23 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 18173613F9 for ; Fri, 11 Jun 2021 17:12:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230360AbhFKROU (ORCPT ); Fri, 11 Jun 2021 13:14:20 -0400 Received: from mail.kernel.org ([198.145.29.99]:60626 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhFKROT (ORCPT ); Fri, 11 Jun 2021 13:14:19 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 3C0FB613CF; Fri, 11 Jun 2021 17:12:21 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431542; bh=/ccWvm+2Km7le07gw7bhFqVqTjzWRzqBPIEcB5exnEw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=kHWFxHqB4N9CHxFl6Edm2EZ5PuNFtFkRe5qa3XtkIcnJ0uQm8CypZI9k+xbUUPb3U UjgfaswWt9GwareZYB19txXGaanGXkVzcAQib9+m7PNSrTezJ2rO7oYnl4McfhVn4b WiF4HndApWY7AQVpCjH+ooZ1Kwb48HMqgUPrbjPUtLIzs+5C45gcckpIYkbPedho8+ fiEi1+vAmp9YnwynTylaLduQd6o2DnyGRjHD1kPh2W1kjL7t9VXbQLIlbCUwf45DMK 4ANwfbgXmnAO+HL147t6BLL+WcCVQWlPYoAzKQGLe/ENE5HHwCEpHm3BQvs0t4SBgV hiXgHbZVip6Dw== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Harinath Nampally Subject: [PATCH 09/12] iio:accel:freescale drivers: Cleanup includes Date: Fri, 11 Jun 2021 18:13:51 +0100 Message-Id: <20210611171355.202903-10-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use checker. For these drivers most of the changes are the addition of includes for headers directly used in the files There is no hard and fast rule for when to include and when to assume included by another header, so this is partly a matter of taste and consistency. Signed-off-by: Jonathan Cameron Cc: Harinath Nampally --- drivers/iio/accel/mma7455_core.c | 3 ++- drivers/iio/accel/mma7455_i2c.c | 1 + drivers/iio/accel/mma7455_spi.c | 1 + drivers/iio/accel/mma7660.c | 3 +++ drivers/iio/accel/mma8452.c | 5 +++++ drivers/iio/accel/mma9551.c | 7 ++++--- drivers/iio/accel/mma9551_core.h | 2 ++ drivers/iio/accel/mma9553.c | 6 ++++-- 8 files changed, 22 insertions(+), 6 deletions(-) diff --git a/drivers/iio/accel/mma7455_core.c b/drivers/iio/accel/mma7455_core.c index 922bd38ff6ea..94160c3e0e64 100644 --- a/drivers/iio/accel/mma7455_core.c +++ b/drivers/iio/accel/mma7455_core.c @@ -11,12 +11,13 @@ */ #include +#include #include #include #include -#include #include #include +#include #include #include diff --git a/drivers/iio/accel/mma7455_i2c.c b/drivers/iio/accel/mma7455_i2c.c index cddeaa9e230a..c0dc648e4ada 100644 --- a/drivers/iio/accel/mma7455_i2c.c +++ b/drivers/iio/accel/mma7455_i2c.c @@ -6,6 +6,7 @@ #include #include +#include #include #include "mma7455.h" diff --git a/drivers/iio/accel/mma7455_spi.c b/drivers/iio/accel/mma7455_spi.c index eb82cdfa8abc..8339099e8e3d 100644 --- a/drivers/iio/accel/mma7455_spi.c +++ b/drivers/iio/accel/mma7455_spi.c @@ -5,6 +5,7 @@ */ #include +#include #include #include diff --git a/drivers/iio/accel/mma7660.c b/drivers/iio/accel/mma7660.c index 47f5cd66e996..32d132749ebd 100644 --- a/drivers/iio/accel/mma7660.c +++ b/drivers/iio/accel/mma7660.c @@ -9,7 +9,10 @@ #include #include +#include #include +#include +#include #include #include diff --git a/drivers/iio/accel/mma8452.c b/drivers/iio/accel/mma8452.c index 715b8138fb71..1f5f6a24b7b8 100644 --- a/drivers/iio/accel/mma8452.c +++ b/drivers/iio/accel/mma8452.c @@ -19,6 +19,7 @@ */ #include +#include #include #include #include @@ -28,9 +29,13 @@ #include #include #include +#include +#include #include #include #include +#include +#include #include #define MMA8452_STATUS 0x00 diff --git a/drivers/iio/accel/mma9551.c b/drivers/iio/accel/mma9551.c index 4c359fb05480..dc9824eef7f7 100644 --- a/drivers/iio/accel/mma9551.c +++ b/drivers/iio/accel/mma9551.c @@ -5,15 +5,16 @@ */ #include +#include #include #include -#include #include -#include +#include #include #include -#include #include +#include +#include #include #include "mma9551_core.h" diff --git a/drivers/iio/accel/mma9551_core.h b/drivers/iio/accel/mma9551_core.h index 543454a31dc0..3d6c774d33f8 100644 --- a/drivers/iio/accel/mma9551_core.h +++ b/drivers/iio/accel/mma9551_core.h @@ -38,6 +38,8 @@ enum mma9551_gpio_pin { .info_mask_shared_by_type = BIT(IIO_CHAN_INFO_SCALE), \ } +struct i2c_client; +struct iio_chan_spec; int mma9551_read_config_byte(struct i2c_client *client, u8 app_id, u16 reg, u8 *val); int mma9551_write_config_byte(struct i2c_client *client, u8 app_id, diff --git a/drivers/iio/accel/mma9553.c b/drivers/iio/accel/mma9553.c index ba3ecb3b57dc..56664193500c 100644 --- a/drivers/iio/accel/mma9553.c +++ b/drivers/iio/accel/mma9553.c @@ -5,13 +5,15 @@ */ #include +#include #include #include -#include #include +#include #include -#include #include +#include +#include #include #include "mma9551_core.h" From patchwork Fri Jun 11 17:13:52 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316305 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D6BE4C48BD1 for ; Fri, 11 Jun 2021 17:12:28 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id BD671613CF for ; Fri, 11 Jun 2021 17:12:28 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231355AbhFKROZ (ORCPT ); Fri, 11 Jun 2021 13:14:25 -0400 Received: from mail.kernel.org ([198.145.29.99]:60632 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230197AbhFKROV (ORCPT ); Fri, 11 Jun 2021 13:14:21 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 5AD75613DF; Fri, 11 Jun 2021 17:12:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431542; bh=TMHig0zfQ8l4RDIfHSpnRxTAbEZykscqYHKS1vo2A0Q=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=T7eAAb5dzASOHfvK8W2ZcA4p0bfLcdv5EE+XAU6iXEYXOyvyUPz7957hxmdhpnWjm teoKbUme53mMkmRvUZ7ba8QKQIzPEOBfnm9wytNDYgIH/VlzhHPYZFoBqeK07qL6oG iSqmEGgOf133E0k/IM20zE7eTGTY6StzXbGJcKd9+B/GZf1unkx3+cYdebvzn4nlAW vMIvNTMXi3ZhDo8A/7l6e8/BivNI+/Y/z+6mbGLoDfF6dbYEfXUuGAb5wI88K3auP0 h45d/eiugdQg9r/N65c+ljJfwSSHVV60/U7RKDWvQShYNDEhBAVLrs7NTY2WRzzctI 3Y/Q/Wq5hkPgw== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 10/12] iio:accel:memsic drivers: Cleanup includes Date: Fri, 11 Jun 2021 18:13:52 +0100 Message-Id: <20210611171355.202903-11-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use tool. Mixture of removing unused headers and adding includes for some of those directly used in these files. There are no hard rules on when to include a header and when to assume it is included by another one. This is an attempt to be more consistent in IIO on that choice. Signed-off-by: Jonathan Cameron --- drivers/iio/accel/mxc4005.c | 4 ++++ drivers/iio/accel/mxc6255.c | 5 ++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/drivers/iio/accel/mxc4005.c b/drivers/iio/accel/mxc4005.c index b3afbf064915..2f4c9bdbfc9e 100644 --- a/drivers/iio/accel/mxc4005.c +++ b/drivers/iio/accel/mxc4005.c @@ -9,6 +9,10 @@ #include #include #include +#include +#include +#include +#include #include #include #include diff --git a/drivers/iio/accel/mxc6255.c b/drivers/iio/accel/mxc6255.c index 9aeeadc420d3..9ab0c66636a7 100644 --- a/drivers/iio/accel/mxc6255.c +++ b/drivers/iio/accel/mxc6255.c @@ -8,13 +8,12 @@ */ #include +#include #include -#include #include -#include +#include #include #include -#include #define MXC6255_DRV_NAME "mxc6255" #define MXC6255_REGMAP_NAME "mxc6255_regmap" From patchwork Fri Jun 11 17:13:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316307 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 515ECC48BE0 for ; Fri, 11 Jun 2021 17:12:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 39A39613D0 for ; Fri, 11 Jun 2021 17:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231450AbhFKRO0 (ORCPT ); Fri, 11 Jun 2021 13:14:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:60638 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231455AbhFKROW (ORCPT ); Fri, 11 Jun 2021 13:14:22 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 52A01613F9; Fri, 11 Jun 2021 17:12:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431544; bh=NsStrQpdCl3lSFsJL4Xb/35jCmMB91Ypo/+Qh5IpW84=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=VRSQBtLRaoJIw7aFxjC7texGEPx1xfdDRmBCBrxqcEK/Pm/fRWLxbbY3QyR1Awcm8 +Eu9w0FbOmlCvx1hDvW41Zd9hBDQIoRBx6G4MTw4H58BfwHadcayDZ7dKaKiwe20Ne KflbAbS9Dy/nE0xiBIYiI//yRa/kufkDD7zAXkg4l+lZR8eGYeGyiv1ahcpnI5AVMp 7E5Yu9O9ZgA3KLQfrCV2sx8aK8patgfV4OAJXS/YTudzflewkDO51MoZoN6JsElBxt Ioq3bsYfz/m/qrLN15fLs1kOiBKaTXgqSuQrFLvdWNj9hAHG947mMdZApMe1DE4guz UaTTLODjySwFg== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron , Tomas Melin Subject: [PATCH 11/12] iio:accel:murata/vti drivers: Include cleanups for the sca**** parts. Date: Fri, 11 Jun 2021 18:13:53 +0100 Message-Id: <20210611171355.202903-12-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of include-what-you-use. Some unused includes dropped and some that are directly used in the files added. There are no hard rules for when we should rely on includes being there as part of including another header and when we should do them directly. This is part of an attempt to be more consistent on that in IIO. Signed-off-by: Jonathan Cameron Cc: Tomas Melin Reviewed-by: Tomas Melin --- drivers/iio/accel/sca3000.c | 5 ++--- drivers/iio/accel/sca3300.c | 3 ++- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/iio/accel/sca3000.c b/drivers/iio/accel/sca3000.c index cb753a43533c..9f4bbf23834f 100644 --- a/drivers/iio/accel/sca3000.c +++ b/drivers/iio/accel/sca3000.c @@ -8,14 +8,13 @@ */ #include -#include #include -#include #include #include #include #include -#include +#include +#include #include #include #include diff --git a/drivers/iio/accel/sca3300.c b/drivers/iio/accel/sca3300.c index f7ef8ecfd34a..2042d8baf7b8 100644 --- a/drivers/iio/accel/sca3300.c +++ b/drivers/iio/accel/sca3300.c @@ -10,13 +10,14 @@ #include #include #include +#include +#include #include #include #include #include -#include #include #include From patchwork Fri Jun 11 17:13:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jonathan Cameron X-Patchwork-Id: 12316309 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-19.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8E091C48BE5 for ; Fri, 11 Jun 2021 17:12:29 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 7F58A613CF for ; Fri, 11 Jun 2021 17:12:29 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231455AbhFKRO0 (ORCPT ); Fri, 11 Jun 2021 13:14:26 -0400 Received: from mail.kernel.org ([198.145.29.99]:60642 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231477AbhFKROY (ORCPT ); Fri, 11 Jun 2021 13:14:24 -0400 Received: by mail.kernel.org (Postfix) with ESMTPSA id 6E7DD613E9; Fri, 11 Jun 2021 17:12:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1623431545; bh=+Y4ZKYWEP6DpEAC0SgA+8Jzd8tB7DWOTVozyLj61PwI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PEYFkt5laAm3tnF0TSIUdRlJdIr4A1IiHwqnCv9LtkoV6xvVv9BPDldkuaPePT009 z+Zjgsu2p6bYr4lPUBKCQQrSlL1F2TvdTPKhikH/d2xpuc4DlfICGePDlFkOQii7mq hB7IsoLc5Mgu61kTKT4+7FP3kWkCBUpNWrnjb7zlNyoAkCPLral71LMlUSB4wKqVrq eH25QZ8HNvJsAosD/Tg0RHUP1dHhnGrigslCRaxzCaKhkyvykKIk8bygCrLEU15E76 d1npzhGBBKA527pT7nlrOmlDAC5DxDLNNFZ5Rzf4P96q6DbuHJBWpbTcCh/WEDVsUZ cHbTBrCMyOytA== From: Jonathan Cameron To: linux-iio@vger.kernel.org Cc: Jonathan Cameron Subject: [PATCH 12/12] iio:accel:sensortek drivers: Add some includes Date: Fri, 11 Jun 2021 18:13:54 +0100 Message-Id: <20210611171355.202903-13-jic23@kernel.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210611171355.202903-1-jic23@kernel.org> References: <20210611171355.202903-1-jic23@kernel.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-iio@vger.kernel.org From: Jonathan Cameron Based on consideration of the output of the include-what-you-use tool. Include a few more headers for things directly used in these files. Note that there are no hard rules for when to include a header directly vs rely on it coming in via another include. This is an attempt to improve consistency on this decision in IIO. Signed-off-by: Jonathan Cameron --- drivers/iio/accel/stk8312.c | 3 +++ drivers/iio/accel/stk8ba50.c | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/iio/accel/stk8312.c b/drivers/iio/accel/stk8312.c index 43c621d0f11e..1f4cab0e31bf 100644 --- a/drivers/iio/accel/stk8312.c +++ b/drivers/iio/accel/stk8312.c @@ -7,10 +7,13 @@ * IIO driver for STK8312; 7-bit I2C address: 0x3D. */ +#include #include #include #include #include +#include +#include #include #include #include diff --git a/drivers/iio/accel/stk8ba50.c b/drivers/iio/accel/stk8ba50.c index e137a34b5c9a..9049f1a5ace4 100644 --- a/drivers/iio/accel/stk8ba50.c +++ b/drivers/iio/accel/stk8ba50.c @@ -12,6 +12,8 @@ #include #include #include +#include +#include #include #include #include