Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3460442ybl; Mon, 12 Aug 2019 00:26:39 -0700 (PDT) X-Google-Smtp-Source: APXvYqzUnWahsLXHPcmMtaFHghnGsRS/GfJyUmYvNkYi0pH/LFgvUtT0FDHPzZOlChEKxRZW7zJ/ X-Received: by 2002:aa7:858b:: with SMTP id w11mr32986285pfn.68.1565594799130; Mon, 12 Aug 2019 00:26:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1565594799; cv=none; d=google.com; s=arc-20160816; b=Dq5bT3RoQrSVJ59bB/TNazrl2OEjvBvxUn3AzQaUXtjzoBsH8ohu4jn4/zacfuJ7G2 xV++QzxW8/FBtbd9/ux1AlE3SOYEvsbT9/QfQNMJHZu4d9jpZi/qRdEnSyZzQj1w8P7z 1d3degmjyMFbJYihzDr0LIHsi6Y9pz5ooAqFUEOCJ6baEANwJj9rSTijcBBpSe4PPKZ2 nFq9K6pEOaF9Ea/bLYkAYDfVTKmzQC8rKqU7D8KGBEgVZ0ir83eVvF8dEbpjoZXd15gw DlJ+xkFL62j32U1aHxbqsh1kNKnPQVw9u0D3z/lU4DUFAd4/BxjDtYN2yPex6jkKOwaG AH9Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-transfer-encoding:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=11yg2kZY2EGWgze2Lbg0UUFU1Rc/h3ZItQKf4ZrpjYA=; b=CKWKUdEr4lsS169CWsv96WDmoqDUNlKE697MTxVwElD7Z9pCSYUbGMjJBVj0d3yAsg WdjCx4i9uZ1KsDauDTrOaxBFsuLDMyZIok/J2oZaoTJtLJEg9mwUWTxjLsMj/CUAbNRM KeE/meER/U+HjrwKB07AISqaBn/8CH4exmktDvSYFjtK0DIqFschZBl8tV48ezs3VHjD yGMbLwMfhHEcgXbD6F2SnTOm1ZO+5ShEj6o1FTzfBAelnMLdVBs6BeliVCmO/9yZm1KS SmbSIOO/U/xKyZgBJdxDD/C5syboxlL5ztyXj4VR+mkwgtrzetJTrYx0AnJAuUN+H++f qhVA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=hZ7qD4mP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h21si1537679pjq.19.2019.08.12.00.26.24; Mon, 12 Aug 2019 00:26:39 -0700 (PDT) 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; dkim=pass header.i=@linaro.org header.s=google header.b=hZ7qD4mP; 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=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727064AbfHLHZ1 (ORCPT + 99 others); Mon, 12 Aug 2019 03:25:27 -0400 Received: from mail-wr1-f65.google.com ([209.85.221.65]:33386 "EHLO mail-wr1-f65.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726869AbfHLHZ1 (ORCPT ); Mon, 12 Aug 2019 03:25:27 -0400 Received: by mail-wr1-f65.google.com with SMTP id n9so103771285wru.0 for ; Mon, 12 Aug 2019 00:25:25 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:content-transfer-encoding:in-reply-to :user-agent; bh=11yg2kZY2EGWgze2Lbg0UUFU1Rc/h3ZItQKf4ZrpjYA=; b=hZ7qD4mPYJCW3INiL/R7Ln6McrJj6k0FSdpelbm7c37yKhbpf0HkTd5MXhPgz9FhTM 490Aq65MJXUxgDLjRcKhHsQWJtNGwGSTDBCKnRXwOEQcGHuS3EuyXoHfu7b4nW6jyv6E s4nnqwXYxk/b/61gVM8MJVqz8D3AdjCrCA+bDRnboVR9M/USL9EzjQEXz5d17pg2AYBJ 595IlksbzR5vbDO/WqigbfFEmRBAqR1gzt7Xd54PLkrK1N24m2vbLW2R8vJIVY1rl6lb 6iauylJ65MvHuqLPcaxpRgnv4LG9dCmtc6suI1FVFYJ6+KeALOkp2IQ45d18L60Xa19i aD/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:content-transfer-encoding :in-reply-to:user-agent; bh=11yg2kZY2EGWgze2Lbg0UUFU1Rc/h3ZItQKf4ZrpjYA=; b=CwphPMpmAhX2O5LGHIygEeYss/oGeDe6IWohtXaHDL6zv83I22cHRRk+/BvGWysiop g26N2pbtxJxFNEc8NVsGIhxvofsWqNp1U0pZAHKtmv3k0uhP9mdT1rXN7KT9uRo/6pL8 ZYKpjmn6gc0yoybMWYQWhJ23uVJcHxDcNLRlXLLdZlgd1TSQnmwWu+9PpMcV8058h46m ZXB6sRY1BY+giaU/mWvt6LrE6GuBwjMtPnou2uctQICIOVmQZW/XihZVjIWBsdpjkawy BI0oOoQ6kuS8MgbwZ5HnJIu03h4lfzmAzKUGkDLVZP0cC1Punaq8GESDCpGahPm4Qei6 6OtQ== X-Gm-Message-State: APjAAAV9YX/WlcVi616Io+03W6ivngXUW6lhvW5KepgzZunWADzKZHni bF93feC8jIRqGheS92sVRpYviQ== X-Received: by 2002:a5d:494d:: with SMTP id r13mr31649826wrs.82.1565594724814; Mon, 12 Aug 2019 00:25:24 -0700 (PDT) Received: from dell ([2.27.35.255]) by smtp.gmail.com with ESMTPSA id c15sm50894256wrb.80.2019.08.12.00.25.23 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 12 Aug 2019 00:25:24 -0700 (PDT) Date: Mon, 12 Aug 2019 08:25:22 +0100 From: Lee Jones To: Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, Jonathan Corbet , Krzysztof Kozlowski , Will Deacon , MyungJoo Ham , Chanwoo Choi , Benson Leung , Guenter Roeck , Jonathan Cameron , Dmitry Torokhov , Mauro Carvalho Chehab , Sebastian Reichel , Thierry Reding , Alexandre Belloni , Liam Girdwood , Mark Brown , Neil Armstrong , Greg Kroah-Hartman , Collabora kernel ML , Andy Shevchenko , Wolfram Sang , Jonathan Cameron , Benjamin Tissoires , Sebastian Reichel , Gwendal Grignou Subject: Re: [PATCH v5 06/11] mfd / platform: cros_ec: Reorganize platform and mfd includes Message-ID: <20190812072522.GJ4594@dell> References: <20190722133257.9336-1-enric.balletbo@collabora.com> <20190722133257.9336-7-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20190722133257.9336-7-enric.balletbo@collabora.com> User-Agent: Mutt/1.9.4 (2018-02-28) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 22 Jul 2019, Enric Balletbo i Serra wrote: > There is a bit of mess between cros-ec mfd includes and platform > includes. For example, we have a linux/mfd/cros_ec.h include that > exports the interface implemented in platform/chrome/cros_ec_proto.c. Or > we have a linux/mfd/cros_ec_commands.h file that is non related to the > multifunction device (in the sense that is not exporting any function of > the mfd device). This causes crossed includes between mfd and > platform/chrome subsystems and makes the code difficult to read, apart > from creating 'curious' situations where a platform/chrome driver includes > a linux/mfd/cros_ec.h file just to get the exported functions that are > implemented in another platform/chrome driver. > > In order to have a better separation on what the cros-ec multifunction > driver does and what the cros-ec core provides move and rework the > affected includes doing: > > - Move cros_ec_commands.h to include/linux/platform_data/cros_ec_commands.h > - Get rid of the parts that are implemented in the platform/chrome/cros_ec_proto.c > driver from include/linux/mfd/cros_ec.h to a new file > include/linux/platform_data/cros_ec_proto.h > - Update all the drivers with the new includes, so > - Drivers that only need to know about the protocol include > - linux/platform_data/cros_ec_proto.h > - linux/platform_data/cros_ec_commands.h > - Drivers that need to know about the cros-ec mfd device also include > - linux/mfd/cros_ec.h > > Signed-off-by: Enric Balletbo i Serra > Acked-by: Andy Shevchenko > Acked-by: Mark Brown > Acked-by: Wolfram Sang > Acked-by: Neil Armstrong > Acked-by: Alexandre Belloni > Acked-by: Jonathan Cameron > Acked-by: Benjamin Tissoires > Acked-by: Dmitry Torokhov > Acked-by: Sebastian Reichel > Acked-by: Chanwoo Choi > Reviewed-by: Gwendal Grignou > Tested-by: Gwendal Grignou > Series changes: 3 > - Fix dereferencing pointer to incomplete type 'struct cros_ec_dev' (lkp) > --- > > Changes in v5: None > Changes in v4: None > Changes in v3: None > Changes in v2: None > > drivers/extcon/extcon-usbc-cros-ec.c | 3 +- > drivers/hid/hid-google-hammer.c | 4 +- > drivers/i2c/busses/i2c-cros-ec-tunnel.c | 4 +- > drivers/iio/accel/cros_ec_accel_legacy.c | 3 +- > .../cros_ec_sensors/cros_ec_lid_angle.c | 3 +- > .../common/cros_ec_sensors/cros_ec_sensors.c | 3 +- > .../cros_ec_sensors/cros_ec_sensors_core.c | 3 +- > drivers/iio/light/cros_ec_light_prox.c | 3 +- > drivers/iio/pressure/cros_ec_baro.c | 3 +- > drivers/input/keyboard/cros_ec_keyb.c | 4 +- > .../media/platform/cros-ec-cec/cros-ec-cec.c | 5 +- > drivers/mfd/cros_ec_dev.c | 3 +- > drivers/platform/chrome/cros_ec.c | 3 +- > drivers/platform/chrome/cros_ec_chardev.c | 3 +- > drivers/platform/chrome/cros_ec_debugfs.c | 3 +- > drivers/platform/chrome/cros_ec_i2c.c | 4 +- > drivers/platform/chrome/cros_ec_ishtp.c | 5 +- > drivers/platform/chrome/cros_ec_lightbar.c | 3 +- > drivers/platform/chrome/cros_ec_lpc.c | 4 +- > drivers/platform/chrome/cros_ec_proto.c | 3 +- > drivers/platform/chrome/cros_ec_rpmsg.c | 4 +- > drivers/platform/chrome/cros_ec_spi.c | 4 +- > drivers/platform/chrome/cros_ec_sysfs.c | 3 +- > drivers/platform/chrome/cros_ec_trace.c | 2 +- > drivers/platform/chrome/cros_ec_trace.h | 4 +- > drivers/platform/chrome/cros_ec_vbc.c | 3 +- > drivers/platform/chrome/cros_usbpd_logger.c | 5 +- > drivers/power/supply/cros_usbpd-charger.c | 5 +- > drivers/pwm/pwm-cros-ec.c | 4 +- > drivers/rtc/rtc-cros-ec.c | 3 +- > .../linux/iio/common/cros_ec_sensors_core.h | 3 +- > include/linux/mfd/cros_ec.h | 308 ----------------- > .../{mfd => platform_data}/cros_ec_commands.h | 0 > include/linux/platform_data/cros_ec_proto.h | 317 ++++++++++++++++++ > sound/soc/codecs/cros_ec_codec.c | 4 +- > 35 files changed, 383 insertions(+), 355 deletions(-) > rename include/linux/{mfd => platform_data}/cros_ec_commands.h (100%) > create mode 100644 include/linux/platform_data/cros_ec_proto.h For my own reference: Acked-for-MFD-by: Lee Jones -- Lee Jones [李琼斯] Linaro Services Technical Lead Linaro.org │ Open source software for ARM SoCs Follow Linaro: Facebook | Twitter | Blog