Received: by 2002:a5b:505:0:0:0:0:0 with SMTP id o5csp5956053ybp; Tue, 15 Oct 2019 07:32:05 -0700 (PDT) X-Google-Smtp-Source: APXvYqzpb7bdgccXqVWQgAmWAmljHu8EldMguFtdz+5FCwMQItvdOq+H0ll9u0RQFuSIY2hSCwyM X-Received: by 2002:a17:906:6ad7:: with SMTP id q23mr33443869ejs.214.1571149925237; Tue, 15 Oct 2019 07:32:05 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1571149925; cv=none; d=google.com; s=arc-20160816; b=F52ddWhCJl3WVT4ihkWAfGFNEnavpdYfT8uOtH+JcPQz/TKgi5KCeAijMh6qQd24vG dfbuwu8+UmqAEvzCWY8MtzSNTnJpuVrlKjoQUU241kDCBQRJe21Kmj9od6+Hroqwy/xu mKQ/qvujwPgRnH6FJnv/CkGGWxrkpnVNJi+UlEomNaLiSvG/ZXULiGMOHn5N+gEQh+Fo ae4Tye4XUSByoViE/z95uS79TFCKw84WZHMbxy7RroTiMJrbdxT+/YJCH8CQ5BY0tK2v MYLIGMXxC7+TEcc8xdikjbTEWy6rJAU47j18ej+c58Ps2jztuMvhdFRGwsKc6k2e7efO Wctg== 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=7hw7OKyUuRfwOL/pY3kVmnsI4RrfIf6LVznbXeiPdmQ=; b=QkcsmqM8ZCsnd53aNMPkOXzYhiBHUh2SZOkwa7qR1pQ5+aqAs7TQ7Qb3/Vrpb+iLwG PTIXzBwKNfifLVuDeqcjmXzvn0+WpZeh9N7Ftq0asyeH77nFxbOIe3hvAL5KksJsiwQ0 +jS32rcC9VOSosnKPcDow5qWCCo+qZC/AGz4HOG3eXCJr0kLkxMmjiCLt8qgYhweimg5 FklIExRUarzZ8LKBOotBS/CoVxsCzwtVRagRHkRm3ovH/ZxY6j9myC19Bbk4BomhPAcO Ky5xot4eQjcmy5grJUUu5TI2tTygSJN06HkwnWnKWY7Ffrb/mpWAQqqQUqPStCdygCF+ 7U1g== 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 a8si15051184edm.240.2019.10.15.07.31.41; Tue, 15 Oct 2019 07:32:05 -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; 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 S1732781AbfJOOa7 convert rfc822-to-8bit (ORCPT + 99 others); Tue, 15 Oct 2019 10:30:59 -0400 Received: from relay3-d.mail.gandi.net ([217.70.183.195]:48333 "EHLO relay3-d.mail.gandi.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1732087AbfJOOa6 (ORCPT ); Tue, 15 Oct 2019 10:30:58 -0400 X-Originating-IP: 86.250.200.211 Received: from xps13 (lfbn-1-17395-211.w86-250.abo.wanadoo.fr [86.250.200.211]) (Authenticated sender: miquel.raynal@bootlin.com) by relay3-d.mail.gandi.net (Postfix) with ESMTPSA id C300D60014; Tue, 15 Oct 2019 14:30:55 +0000 (UTC) Date: Tue, 15 Oct 2019 16:30:55 +0200 From: Miquel Raynal To: Andy Shevchenko Cc: Linus Walleij , Bartosz Golaszewski , Thierry Reding , Uwe =?UTF-8?B?S2xlaW5lLUvDtm5pZw==?= , "open list:GPIO SUBSYSTEM" , linux-pwm@vger.kernel.org, Linux Kernel Mailing List , Thomas Petazzoni Subject: Re: [PATCH] gpio: pca953x: Add Maxim MAX7313 PWM support Message-ID: <20191015163055.0d8f44e5@xps13> In-Reply-To: References: <20191014124803.13661-1-miquel.raynal@bootlin.com> 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 Andy, Thanks for the feedback. Andy Shevchenko wrote on Mon, 14 Oct 2019 20:59:01 +0300: > On Mon, Oct 14, 2019 at 4:09 PM Miquel Raynal wrote: > > > > The MAX7313 chip is fully compatible with the PCA9535 on its basic > > functions but can also manage the intensity on each of its ports with > > PWM. Each output is independent and may be tuned with 16 values (4 > > bits per output). The period is always 32kHz, only the duty-cycle may > > be changed. One can use any output as GPIO or PWM. > > Can we rather not contaminate driver with this? > > Just register a separate PWM driver and export its functionality to > GPIO, or other way around (in the latter case we actually have PCA8685 > which provides a GPIO fgunctionality). > I understand your concern but I am not sure to understand which solution you have in mind. In the former case, could you explain a bit more what you are thinking about? Would linking the PWM support with the GPIO driver (code would be located in another .c file) work for you? Or maybe you would prefer an MFD on top of the GPIO driver? As for the later case, I am not willing to re-implement GPIO support in an alternate driver for an already supported chip, it is too much work for the time I can spend on it. Thanks, Miquèl