Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp1335324ybl; Wed, 18 Dec 2019 16:58:43 -0800 (PST) X-Google-Smtp-Source: APXvYqxRqnwfD2sLinlan6f6XkX3yeLQC2pVC3tkVpyASgKRVb31knseYA14MUvaLFyX1VzTKwsb X-Received: by 2002:a05:6830:4a7:: with SMTP id l7mr3659171otd.372.1576717122913; Wed, 18 Dec 2019 16:58:42 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1576717122; cv=none; d=google.com; s=arc-20160816; b=YxOm0t32AXx7W0xWNCZEEytOthS2k7sCY5BMTQyemPZvB49yrPGQih20UMl3VTiLX+ Qrrlveb3KCotJOFZ+/uP+GigOAdz94JettmhZD90CvpiVakdsNXtxeY39G6HrQk+jJqB 6CMig4GTHorxv+5/HttrcnVJC05QYCNRs2ch/81HiBz9eWHRl8XoCQHZ+TeHavKS28px 8XhFv/mEbwh3iaxSmbFtKu6QPkw0gUx6+ixOHnTetrXM/MBzn2MubYzWm1vBXSKLRfCs Rny0xFsSaJOdDk1S1Wrhi3IQOGN7cgZl0pbdlT6cRc0DQuc5JU3Onl6IN70U/LFHjsu9 MKUw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date; bh=jxgXOA6RE63AIDVA3YfWmYqN7o5sEqoUv+vGGBdtVn4=; b=P5ZFa+wkhpemLPuwjwL+0YDcR9bkF/ps6jFOE+URaZl4OJOgCoI23HlH5wamtNASDB jrNGkStE0LLouJOia301HXyGz3vlb+Vpz9CdnXbXSNughXxpnq+lWyR5o1yYTZkCSqE3 ghYfGzZSUT6gQkCxL9NNdxTmDnQls459cUCo5rTSqBhNJipuNWMbOQgR84r1LZyjLEWS XAyuFFaks6OGHbTE5ApIBkDdE4h3TRYmG9NMslP3GcXGKk8afJoA8SnhxBhyPbN7i1Jr 99jNu3uhraOSBbTpofWNePMz6kcNehWdmqXUHGgW3jLytf16NDNlJqMG7xrEdqzkRB8A ORSg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id l18si2366232oth.236.2019.12.18.16.58.30; Wed, 18 Dec 2019 16:58:42 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726747AbfLSA5q (ORCPT + 99 others); Wed, 18 Dec 2019 19:57:46 -0500 Received: from bhuna.collabora.co.uk ([46.235.227.227]:39338 "EHLO bhuna.collabora.co.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726518AbfLSA5p (ORCPT ); Wed, 18 Dec 2019 19:57:45 -0500 Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: sre) with ESMTPSA id 8CED02911A3 Received: by earth.universe (Postfix, from userid 1000) id 3CB9B3C0C7B; Thu, 19 Dec 2019 01:57:39 +0100 (CET) Date: Thu, 19 Dec 2019 01:57:39 +0100 From: Sebastian Reichel To: Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, Collabora Kernel ML , groeck@chromium.org, bleung@chromium.org, dtor@chromium.org, gwendal@chromium.org, Mauro Carvalho Chehab , Alessandro Zummo , linux-iio@vger.kernel.org, Nick Vaccaro , Fabien Lahoudere , Alexandre Belloni , linux-rtc@vger.kernel.org, Chanwoo Choi , "Gustavo A. R. Silva" , Lars-Peter Clausen , Jonathan Cameron , Peter Meerwald-Stadler , linux-media@vger.kernel.org, linux-pm@vger.kernel.org, Lee Jones , Evan Green , Hartmut Knaack , Mark Brown , Neil Armstrong , Dmitry Torokhov , Hans Verkuil Subject: Re: [PATCH] cros_ec: treewide: Remove 'include/linux/mfd/cros_ec.h' Message-ID: <20191219005739.loynj6js32vtwdyq@earth.universe> References: <20191203145018.14015-1-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="k4no5alxjmkmaa2l" Content-Disposition: inline In-Reply-To: <20191203145018.14015-1-enric.balletbo@collabora.com> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org --k4no5alxjmkmaa2l Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi, On Tue, Dec 03, 2019 at 03:50:18PM +0100, Enric Balletbo i Serra wrote: > This header file now only includes the cros_ec_dev struct, however, is the > 'include/linux/platform_data/cros_ec_proto.h' who contains the definition= of > all the Chrome OS EC related structs. There is no reason to have a > separate include for this struct so move to the place where other > structs are defined. That way, we can remove the include itself, but also > simplify the common pattern >=20 > #include > #include >=20 > for a single include >=20 > #include >=20 > The changes to remove the cros_ec.h include were generated with the > following shell script: >=20 > git grep -l "" | xargs sed -i '//d' >=20 > Signed-off-by: Enric Balletbo i Serra > --- >=20 > drivers/iio/accel/cros_ec_accel_legacy.c | 1 - > .../common/cros_ec_sensors/cros_ec_sensors.c | 1 - > .../cros_ec_sensors/cros_ec_sensors_core.c | 1 - > drivers/iio/light/cros_ec_light_prox.c | 1 - > drivers/iio/pressure/cros_ec_baro.c | 1 - > .../media/platform/cros-ec-cec/cros-ec-cec.c | 1 - > drivers/mfd/cros_ec_dev.c | 1 - > drivers/platform/chrome/cros_ec_chardev.c | 1 - > drivers/platform/chrome/cros_ec_debugfs.c | 1 - > drivers/platform/chrome/cros_ec_lightbar.c | 1 - > drivers/platform/chrome/cros_ec_sensorhub.c | 1 - > drivers/platform/chrome/cros_ec_sysfs.c | 1 - > drivers/platform/chrome/cros_ec_vbc.c | 1 - > drivers/platform/chrome/cros_usbpd_logger.c | 1 - > drivers/power/supply/cros_usbpd-charger.c | 1 - Acked-by: Sebastian Reichel Feel free to merge through your tree. -- Sebastian > drivers/rtc/rtc-cros-ec.c | 1 - > include/linux/mfd/cros_ec.h | 35 ------------------- > include/linux/platform_data/cros_ec_proto.h | 23 +++++++++++- > 18 files changed, 22 insertions(+), 52 deletions(-) > delete mode 100644 include/linux/mfd/cros_ec.h >=20 > diff --git a/drivers/iio/accel/cros_ec_accel_legacy.c b/drivers/iio/accel= /cros_ec_accel_legacy.c > index 65f85faf6f31..68e847c6255e 100644 > --- a/drivers/iio/accel/cros_ec_accel_legacy.c > +++ b/drivers/iio/accel/cros_ec_accel_legacy.c > @@ -18,7 +18,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c b/drive= rs/iio/common/cros_ec_sensors/cros_ec_sensors.c > index 7dce04473467..576e45faafaf 100644 > --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c > +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors.c > @@ -16,7 +16,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c b/= drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c > index 81a7f692de2f..d3a3626c7cd8 100644 > --- a/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c > +++ b/drivers/iio/common/cros_ec_sensors/cros_ec_sensors_core.c > @@ -13,7 +13,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/iio/light/cros_ec_light_prox.c b/drivers/iio/light/c= ros_ec_light_prox.c > index d85a391e50c5..7a838e2956f4 100644 > --- a/drivers/iio/light/cros_ec_light_prox.c > +++ b/drivers/iio/light/cros_ec_light_prox.c > @@ -14,7 +14,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/iio/pressure/cros_ec_baro.c b/drivers/iio/pressure/c= ros_ec_baro.c > index 2354302375de..d2a67dceb996 100644 > --- a/drivers/iio/pressure/cros_ec_baro.c > +++ b/drivers/iio/pressure/cros_ec_baro.c > @@ -14,7 +14,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c b/drivers/m= edia/platform/cros-ec-cec/cros-ec-cec.c > index 4a3b3810fd89..72c70f123650 100644 > --- a/drivers/media/platform/cros-ec-cec/cros-ec-cec.c > +++ b/drivers/media/platform/cros-ec-cec/cros-ec-cec.c > @@ -14,7 +14,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/mfd/cros_ec_dev.c b/drivers/mfd/cros_ec_dev.c > index c4b977a5dd96..8da4e4cef26f 100644 > --- a/drivers/mfd/cros_ec_dev.c > +++ b/drivers/mfd/cros_ec_dev.c > @@ -6,7 +6,6 @@ > */ > =20 > #include > -#include > #include > #include > #include > diff --git a/drivers/platform/chrome/cros_ec_chardev.c b/drivers/platform= /chrome/cros_ec_chardev.c > index 74ded441bb50..c65e70bc168d 100644 > --- a/drivers/platform/chrome/cros_ec_chardev.c > +++ b/drivers/platform/chrome/cros_ec_chardev.c > @@ -13,7 +13,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/platform/chrome/cros_ec_debugfs.c b/drivers/platform= /chrome/cros_ec_debugfs.c > index 6ae484989d1f..ecfada00e6c5 100644 > --- a/drivers/platform/chrome/cros_ec_debugfs.c > +++ b/drivers/platform/chrome/cros_ec_debugfs.c > @@ -7,7 +7,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/platform/chrome/cros_ec_lightbar.c b/drivers/platfor= m/chrome/cros_ec_lightbar.c > index c0f2eec35a48..b4c110c5fee0 100644 > --- a/drivers/platform/chrome/cros_ec_lightbar.c > +++ b/drivers/platform/chrome/cros_ec_lightbar.c > @@ -8,7 +8,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/platform/chrome/cros_ec_sensorhub.c b/drivers/platfo= rm/chrome/cros_ec_sensorhub.c > index 04d8879689e9..79fefd3bb0fa 100644 > --- a/drivers/platform/chrome/cros_ec_sensorhub.c > +++ b/drivers/platform/chrome/cros_ec_sensorhub.c > @@ -9,7 +9,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/platform/chrome/cros_ec_sysfs.c b/drivers/platform/c= hrome/cros_ec_sysfs.c > index 74d36b8d4f46..07dac97ad57c 100644 > --- a/drivers/platform/chrome/cros_ec_sysfs.c > +++ b/drivers/platform/chrome/cros_ec_sysfs.c > @@ -8,7 +8,6 @@ > #include > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/platform/chrome/cros_ec_vbc.c b/drivers/platform/chr= ome/cros_ec_vbc.c > index f11a1283e5c8..8edae465105c 100644 > --- a/drivers/platform/chrome/cros_ec_vbc.c > +++ b/drivers/platform/chrome/cros_ec_vbc.c > @@ -6,7 +6,6 @@ > =20 > #include > #include > -#include > #include > #include > #include > diff --git a/drivers/platform/chrome/cros_usbpd_logger.c b/drivers/platfo= rm/chrome/cros_usbpd_logger.c > index 374cdd1e868a..7de3ea75ef46 100644 > --- a/drivers/platform/chrome/cros_usbpd_logger.c > +++ b/drivers/platform/chrome/cros_usbpd_logger.c > @@ -6,7 +6,6 @@ > */ > =20 > #include > -#include > #include > #include > #include > diff --git a/drivers/power/supply/cros_usbpd-charger.c b/drivers/power/su= pply/cros_usbpd-charger.c > index 6cc7c3910e09..0aca0da41cb7 100644 > --- a/drivers/power/supply/cros_usbpd-charger.c > +++ b/drivers/power/supply/cros_usbpd-charger.c > @@ -5,7 +5,6 @@ > * Copyright (c) 2014 - 2018 Google, Inc > */ > =20 > -#include > #include > #include > #include > diff --git a/drivers/rtc/rtc-cros-ec.c b/drivers/rtc/rtc-cros-ec.c > index d043d30f05bc..f7343c289cab 100644 > --- a/drivers/rtc/rtc-cros-ec.c > +++ b/drivers/rtc/rtc-cros-ec.c > @@ -5,7 +5,6 @@ > // Author: Stephen Barber > =20 > #include > -#include > #include > #include > #include > diff --git a/include/linux/mfd/cros_ec.h b/include/linux/mfd/cros_ec.h > deleted file mode 100644 > index 61c2875c2a40..000000000000 > --- a/include/linux/mfd/cros_ec.h > +++ /dev/null > @@ -1,35 +0,0 @@ > -/* SPDX-License-Identifier: GPL-2.0-only */ > -/* > - * ChromeOS EC multi-function device > - * > - * Copyright (C) 2012 Google, Inc > - */ > - > -#ifndef __LINUX_MFD_CROS_EC_H > -#define __LINUX_MFD_CROS_EC_H > - > -#include > - > -/** > - * struct cros_ec_dev - ChromeOS EC device entry point. > - * @class_dev: Device structure used in sysfs. > - * @ec_dev: cros_ec_device structure to talk to the physical device. > - * @dev: Pointer to the platform device. > - * @debug_info: cros_ec_debugfs structure for debugging information. > - * @has_kb_wake_angle: True if at least 2 accelerometer are connected to= the EC. > - * @cmd_offset: Offset to apply for each command. > - * @features: Features supported by the EC. > - */ > -struct cros_ec_dev { > - struct device class_dev; > - struct cros_ec_device *ec_dev; > - struct device *dev; > - struct cros_ec_debugfs *debug_info; > - bool has_kb_wake_angle; > - u16 cmd_offset; > - u32 features[2]; > -}; > - > -#define to_cros_ec_dev(dev) container_of(dev, struct cros_ec_dev, class= _dev) > - > -#endif /* __LINUX_MFD_CROS_EC_H */ > diff --git a/include/linux/platform_data/cros_ec_proto.h b/include/linux/= platform_data/cros_ec_proto.h > index 30098a551523..119b9951c055 100644 > --- a/include/linux/platform_data/cros_ec_proto.h > +++ b/include/linux/platform_data/cros_ec_proto.h > @@ -12,7 +12,6 @@ > #include > #include > =20 > -#include > #include > =20 > #define CROS_EC_DEV_NAME "cros_ec" > @@ -185,6 +184,28 @@ struct cros_ec_platform { > u16 cmd_offset; > }; > =20 > +/** > + * struct cros_ec_dev - ChromeOS EC device entry point. > + * @class_dev: Device structure used in sysfs. > + * @ec_dev: cros_ec_device structure to talk to the physical device. > + * @dev: Pointer to the platform device. > + * @debug_info: cros_ec_debugfs structure for debugging information. > + * @has_kb_wake_angle: True if at least 2 accelerometer are connected to= the EC. > + * @cmd_offset: Offset to apply for each command. > + * @features: Features supported by the EC. > + */ > +struct cros_ec_dev { > + struct device class_dev; > + struct cros_ec_device *ec_dev; > + struct device *dev; > + struct cros_ec_debugfs *debug_info; > + bool has_kb_wake_angle; > + u16 cmd_offset; > + u32 features[2]; > +}; > + > +#define to_cros_ec_dev(dev) container_of(dev, struct cros_ec_dev, class= _dev) > + > int cros_ec_suspend(struct cros_ec_device *ec_dev); > =20 > int cros_ec_resume(struct cros_ec_device *ec_dev); > --=20 > 2.20.1 >=20 --k4no5alxjmkmaa2l Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEE72YNB0Y/i3JqeVQT2O7X88g7+poFAl36ywMACgkQ2O7X88g7 +prAzw//QAgClcW4VpTpBRUXBAyl4/w6DmGtBnHiNXjScBr0DHQaptDJPatXaKp8 wCki9QVLPaszgUT0wcZ430z+nFZes7l3qSfW9jSGBKTYvKOttyytlA8V4SPsapTq 8KxYCmENcPjIYehHR13JaLJcXfs8Ke1k4wzpxrCaREGBAuy/4Y8ELF7eQZD1x43P djHJ77aMVZLJsXZza6iux88CH1xBwvHUDnRphdHkA+AES8ofwBo/NWDWvyOXDu2A 1CkRRPn9SOz/ndvsTTflk7i1qzCxUSDF+3k/lt+26l9YYuHqQPx08xBogQKcO5sx LbeksfW9FgUk1qGRtUOj5L//96uY1bt8IHwrAGdJQZF8DlNwJvOJcaQdqW7/TAVd clGsyD6iIUoJxTBlSwMS+GxXopjC/Ib1w86XmwfUIc1ZXD8NMLQTe21CsSYpxFr8 LWUhkq60apQIV/mnb2+o1B+oKDDm7aU23CmjmIfscNEXr84ChxsMHL3J5UcCkbQ8 jNxXGPjCQihIlID2KR8fNvBlPs60gGuDjLfXaYprAK5+QWTHRu2+Mjn796de15im l9gbts3sSMlKyudRJnir5FSdIWBUr8PyIh3cD56uqcap4M2E3WhAME1P9h59UXCq gSrehIaEmtlA0zslfFvTGUK/VvY82QkW729vBG8tiQJpUp2YW1w= =Gr0M -----END PGP SIGNATURE----- --k4no5alxjmkmaa2l--