From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.5 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_MUTT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 178B6C282CE for ; Tue, 4 Jun 2019 14:47:36 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E5CC021734 for ; Tue, 4 Jun 2019 14:47:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727929AbfFDOrf (ORCPT ); Tue, 4 Jun 2019 10:47:35 -0400 Received: from mga02.intel.com ([134.134.136.20]:43104 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727777AbfFDOrd (ORCPT ); Tue, 4 Jun 2019 10:47:33 -0400 X-Amp-Result: UNSCANNABLE X-Amp-File-Uploaded: False Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 04 Jun 2019 07:47:32 -0700 X-ExtLoop1: 1 Received: from lahna.fi.intel.com (HELO lahna) ([10.237.72.157]) by fmsmga001.fm.intel.com with SMTP; 04 Jun 2019 07:47:29 -0700 Received: by lahna (sSMTP sendmail emulation); Tue, 04 Jun 2019 17:47:28 +0300 Date: Tue, 4 Jun 2019 17:47:28 +0300 From: Mika Westerberg To: Sven Van Asbroeck Cc: Thierry Reding , linux-pwm@vger.kernel.org, Linux Kernel Mailing List , Uwe =?iso-8859-1?Q?Kleine-K=F6nig?= , YueHaibing Subject: Re: [PATCH] pwm: pca9685: fix pwm/gpio inter-operation Message-ID: <20190604144728.GY2781@lahna.fi.intel.com> References: <20190603151223.5311-1-TheSven73@gmail.com> <20190604091425.GL2781@lahna.fi.intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Organization: Intel Finland Oy - BIC 0357606-4 - Westendinkatu 7, 02160 Espoo User-Agent: Mutt/1.11.4 (2019-03-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 09:34:46AM -0400, Sven Van Asbroeck wrote: > Thank you for the review, Mika ! See comments below. > > On Tue, Jun 4, 2019 at 5:14 AM Mika Westerberg > wrote: > > > > > This approach will also prevent the request of the "all" pwm channel, if any > > > other pwm channel is already in use. Is this correct behaviour? > > > > Sounds correct to me. > > Something that occurred to me right after I pressed the send button: > > This patch will prevent a pwm 'all channels' request if at least one > of the pwm's is in use. But it will not guard against the opposite: > after the 'all channels' pwm is requested, it will still allow requests > for other pwms/gpios ! > > This is identical to the old behaviour. But maybe this is an oversight > and not a feature? Most probably an oversight. > Proposal: > 1. prevent request of 'all channel' if any of the pwms/gpios are in use > 2. prevent request of all other pwms/gpios if 'all channels' is in use Makes sense.