Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp4662171ybi; Tue, 11 Jun 2019 10:17:35 -0700 (PDT) X-Google-Smtp-Source: APXvYqyq6E0ReVVs+3bMwhYyTzicGuqw86dGjQ7HLK081gY179u6vi3do3lEOFHq7Jr4Rt3QqTVJ X-Received: by 2002:a62:2582:: with SMTP id l124mr58449081pfl.43.1560273455695; Tue, 11 Jun 2019 10:17:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1560273455; cv=none; d=google.com; s=arc-20160816; b=PoVotejb45OvnOUYa/0YTWBEzhvL1QUOXp0bTQ3wP8IqXhVWUUNy0DCdy8bw4tOs9t 6GgWdu9FuFItuFbhiQxPH94Vy22v6+Ccgkz0U+oHDuazYaBNajBPewvdSrT6Ud6AOwV5 SA6lKyrTtzIA/qIGNRgBThmj1aSDhYpahw7hli/HmyMCgIe0uUGnrPxCixRXGFpp06ek a5kYecZ8xAUeJJ8ODrR3Rldm4nrmxBL1XkQWJyt8K4sUsA8yhDbYwy8HpZigPdO9h1GS 545o1NjeyqeclV0GdZRfJgjJc9vMw420jJyXLUhi9TPDVK6QjVqsVxlp/o1CvodfiXCF OISw== 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-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=QfcRtoONgWVTwtnQoP4rlwBElT3so0FbJIuhPmULhig=; b=ZrXyJRy2qxgMHO1bAK5RAsF1DEUvK564Z7Es4KaY0WvDB/jO8UjuB7WCKHjr854NBJ YKzDLOdy7uINBBFLnssiMu455/r4Ywt6E9nnBeQnDdIDpn3XZaOyORY8C73Sp6hUKxb0 1KmZpDJaQ77/cQpV+cWvjO4T5zTtLX2MjMKtDgSRsBrEsbG7dIKdUAmBX0hUvbepv9Vb nGY7wzBlOSWHq9ecOexD0YZJYE7SjBYtlKVkXcTZPEudk3YkUj4b4QuRyhTvMgca4Hiv KpQLmIZtfLpmQ7e4hbq4U0hAvzO/GWWvMwSQuws4+9vQOj8oQjwKQ5SKdMjDOX3mASuu azUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m6uDPrf0; 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=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o5si2750881pju.93.2019.06.11.10.17.19; Tue, 11 Jun 2019 10:17:35 -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=@gmail.com header.s=20161025 header.b=m6uDPrf0; 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=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2405892AbfFKRKf (ORCPT + 99 others); Tue, 11 Jun 2019 13:10:35 -0400 Received: from mail-pf1-f193.google.com ([209.85.210.193]:44591 "EHLO mail-pf1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389356AbfFKRKe (ORCPT ); Tue, 11 Jun 2019 13:10:34 -0400 Received: by mail-pf1-f193.google.com with SMTP id t16so7808092pfe.11; Tue, 11 Jun 2019 10:10:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=QfcRtoONgWVTwtnQoP4rlwBElT3so0FbJIuhPmULhig=; b=m6uDPrf0xbKxHOBxlYlJgBJluDseTqpUrZe+FhasYzB64ReBzKMIdV5XGEhIGV9N+T GciSYgvch7xUNYa81gxMPnMByXHKgU/Oyv2MWE9wocowq9z8bHYJcScjGr0PcGcTVy4I lGX1/Dn9Pq/uG79uFh2Z+2aImHK6qBLTTR6lwi3S0LODaisIL34fRlEQ9XyAQWRucmCq gxSvkYh0kzEMswZuMDBdN9iubeyxHBLfT0gAiB/xF3+YWiYhw8eQQakd8aQ1mSs0vc7O SCjhUKvcmVw0/pQC222MOMCTzDBLJNwhJoJ9HST5soGEe0+2ih1NjRliyjzmVz3qsaNq dc2Q== 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:in-reply-to:user-agent; bh=QfcRtoONgWVTwtnQoP4rlwBElT3so0FbJIuhPmULhig=; b=oFvjPrHxfAuJsU6BvBEklWdbMtcEUe+Zv+JGE4+CO5RhAqBAA6npe3KRMwBv+q+Naa Aq24fmJHpcfw0+nxE3VOPdTv/JFvkL/QQiUwmEPI/224lsVercjHWrIhnOZS71KGTl9y m3sUWujZn3c01XPr/1B6pgLf/1s85DG3poEYdhgHdNLm/Q/bJEn7DGNG7eCqT9/4yqLj ZguVZBl68BXFvHtERW3F+XS0OBFEtY6G6/CnTOmC2tPNptBowpZ0ltOHLsbbAP+FJuPq wUdHb1E74Vz0RNRsCfkO6pJUQc9dh5D7rxUIdYvnHQHgNxXwTtzIMZdcXd7eMpNgXxY5 eTSw== X-Gm-Message-State: APjAAAXojb2UGebfQEybAbsrgmnACc5UQWOIF6KdjMhto9mmM9lP3U+s f0cGRF2lzoNyf4noVY3CCh0= X-Received: by 2002:a63:eb0a:: with SMTP id t10mr19060142pgh.99.1560273033558; Tue, 11 Jun 2019 10:10:33 -0700 (PDT) Received: from dtor-ws ([2620:15c:202:201:3adc:b08c:7acc:b325]) by smtp.gmail.com with ESMTPSA id p15sm16391934pgj.61.2019.06.11.10.10.31 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 10:10:32 -0700 (PDT) Date: Tue, 11 Jun 2019 10:10:30 -0700 From: Dmitry Torokhov To: Enric Balletbo i Serra Cc: linux-kernel@vger.kernel.org, gwendal@chromium.org, Guenter Roeck , Benson Leung , Lee Jones , kernel@collabora.com, dtor@chromium.org, Mauro Carvalho Chehab , alsa-devel@alsa-project.org, Alessandro Zummo , linux-iio@vger.kernel.org, Fabien Lahoudere , Alexandre Belloni , linux-i2c@vger.kernel.org, linux-rtc@vger.kernel.org, Heiko Stuebner , Brian Norris , Chanwoo Choi , Benjamin Tissoires , "Gustavo A. R. Silva" , Sebastian Reichel , Rushikesh S Kadam , linux-input@vger.kernel.org, Lars-Peter Clausen , Jonathan Cameron , Peter Meerwald-Stadler , linux-media@vger.kernel.org, linux-pwm@vger.kernel.org, Thierry Reding , Ravi Chandra Sadineni , linux-pm@vger.kernel.org, Wolfram Sang , Takashi Iwai , Liam Girdwood , MyungJoo Ham , Evan Green , Hartmut Knaack , Cheng-Yi Chiang , Jaroslav Kysela , Kees Cook , Colin Ian King , Mark Brown , Neil Armstrong , Hans Verkuil , Jiri Kosina Subject: Re: [PATCH 06/10] mfd / platform: cros_ec: Reorganize platform and mfd includes Message-ID: <20190611171030.GC143729@dtor-ws> References: <20190604152019.16100-1-enric.balletbo@collabora.com> <20190604152019.16100-7-enric.balletbo@collabora.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190604152019.16100-7-enric.balletbo@collabora.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Jun 04, 2019 at 05:20:15PM +0200, 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: Dmitry Torokhov # for input Thanks. -- Dmitry