Received: by 2002:a25:31c3:0:0:0:0:0 with SMTP id x186csp516765ybx; Tue, 5 Nov 2019 01:04:24 -0800 (PST) X-Google-Smtp-Source: APXvYqxOoC1VR7yRI7uP5fqMWsPeY3q79CT4urj6iBjE2twbZi2jax+awmVmdzlg5NdErUo4e6IB X-Received: by 2002:a17:906:5015:: with SMTP id s21mr27521765ejj.226.1572944664704; Tue, 05 Nov 2019 01:04:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1572944664; cv=none; d=google.com; s=arc-20160816; b=z1NWkmXoglQ3ZPZ13vRdZUXuOrPmjtMcfWvZKIQWpbezaexLvpUwjT42yuZ2sUytcv rUtI+yTXNYZ2JEHby+vT2D7faU9RF/BOHOa+yMpnHL7a+3wOpo55FrQN98apsf5JHjwx SFoESffr4AlEFBuc2adl5CUlzTygrxkla0nInDtGK9LcsW28x4KwNt49AM/0AMu5n6na ddR6UIEY85Rm70DxgiAzbSj3jcpFH2qc1Y+2yIhwFk1s9j7JJ7pRa0uuDC2Wk8K7VwsQ vY8dUJ1AXfnhkZ1zN6d5udZmzVWnpVUHibrOSezdwGmJwWX8nvVla7cyuiwsXQFCTT+k KRxg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :organization:references:in-reply-to:message-id:subject:cc:to:from :date; bh=rDetrxMXyF4oAD2DCTLP7QJK+9it/k34FXHVnEDb514=; b=Zz0iMe58EZizamWIJ+ZJrVrR9JPkcWzv7546BqhaT8WsyIU9eBHJi7+4jSwOh3UcTV j5DYPctSDgyZSOljiaF2OMKtjILwjL58JyBMFpUW5k+zkwRDmcYV/dQsfp/LK4pwbe4Z 6p/isKi7Wd6GoAwKMr9IRFRhEZYbXepRatCgw35cAyGkhC1sbpq5Dh6gK7ft/0YQvJxg i7B4O5LG2GWPvgDDSMD5Q1HBUrnHqEjlUbbVVvJMjpx+xoTZHdtDvG79M8n6cPfnZd3h w3TdaYDwXFvKNvvPO/nVre8WJudMK5/fIK8kQ+YFdR/f14nCPfGa3NkHIv2ICcsC61EJ yC5A== 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id h1si3806507ejq.291.2019.11.05.01.04.01; Tue, 05 Nov 2019 01:04:24 -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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1730655AbfKEJCC convert rfc822-to-8bit (ORCPT + 99 others); Tue, 5 Nov 2019 04:02:02 -0500 Received: from relay12.mail.gandi.net ([217.70.178.232]:55211 "EHLO relay12.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727925AbfKEJCC (ORCPT ); Tue, 5 Nov 2019 04:02:02 -0500 Received: from xps13 (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: miquel.raynal@bootlin.com) by relay12.mail.gandi.net (Postfix) with ESMTPSA id 5CE50200012; Tue, 5 Nov 2019 09:01:58 +0000 (UTC) Date: Tue, 5 Nov 2019 10:01:57 +0100 From: Miquel Raynal To: Andy Shevchenko Cc: Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , Bartosz Golaszewski , Linus Walleij , Thierry Reding , "open list:GPIO SUBSYSTEM" , linux-pwm@vger.kernel.org, Linux Kernel Mailing List , Thomas Petazzoni , Sascha Hauer Subject: Re: [PATCH] gpio: pca953x: Add Maxim MAX7313 PWM support Message-ID: <20191105100157.2b6eb22b@xps13> In-Reply-To: References: <20191014124803.13661-1-miquel.raynal@bootlin.com> <20191015163055.0d8f44e5@xps13> <20191104161103.64995b8a@xps13> <20191104203346.epdbzflnynh2gf3z@pengutronix.de> Organization: Bootlin X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8BIT Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Uwe, Andy Shevchenko wrote on Tue, 5 Nov 2019 09:06:37 +0200: > On Mon, Nov 4, 2019 at 10:33 PM Uwe Kleine-König > wrote: > > On Mon, Nov 04, 2019 at 04:32:23PM +0100, Bartosz Golaszewski wrote: > > > pon., 4 lis 2019 o 16:11 Miquel Raynal napisał(a): > > > > Andy Shevchenko wrote on Tue, 15 Oct 2019 > > > > 17:55:33 +0300: > > > > > > > > > Or other way around. PWM registers GPIO (which actually I prefer since > > > > > we have PCA9685 case where PWM provides GPIO functionality, though via > > > > > different means) > > > While it's not nice to have a driver that provides two different devices > > (here: gpio controller and pwm controller) similar things are not > > unseen. And for example the splitting of watchdog > > (drivers/watchdog/stmp3xxx_rtc_wdt.c) and rtc > > (drivers/rtc/rtc-stmp3xxx.c) of the device in the mx28 is more trouble > > than worth. > > > > So I'd vote for putting it in a single file that lives where the > > bigger/more complex part fits to. So assuming that's the GPIO part (as > > the driver supports several variants and not all of them have a PWM > > function if I'm not mistaken) having it in drivers/gpio is fine for me. > > For me it sounds more likely that PWM is a *pin function* of a pin > controller and actually this GPIO driver should be a pin controller > with corresponding function(s). > Ok, thanks for the input, I will address Thierry's comments and re-submit as a single file (same shape as in v1). Kind regards, Miquèl