Received: by 2002:ac0:a5b6:0:0:0:0:0 with SMTP id m51-v6csp4674775imm; Wed, 30 May 2018 09:47:01 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIEjkv5Cttn69S75qi2w20yioi95IvjR+e7j1iAlFQanEiYcCCA5j9qKO/V2ZYI6WDc+jnP X-Received: by 2002:a63:ac57:: with SMTP id z23-v6mr2715048pgn.394.1527698821157; Wed, 30 May 2018 09:47:01 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1527698821; cv=none; d=google.com; s=arc-20160816; b=xQEIAlWSw9F/UsAQBE47CRiJfcO9rllDdvu/8LeaOPq3909sBEIvjjVkA1YYvk358S QqFhluPNaHO/1IxMqYvEGwwHtwM4hkwg8P0zyvLJt3A3GSAxi/vZxyFagJoT1lMk1AoT fJsEipJ8qlxWamKUjnglnGBXE5jxZd6Md8axoqfLhR4rfKCgN2ALpdIQUircamvWCUNb O/VFoHe3tIqE0/ulmmZQSA836ykUohkyqFXeznuJ8RX+6aOk5sJufqexQJCWD92hM2hI J+cTFRVA7BDY/49sBqsB+fXYVC4eIwtUz90mOZI7NZah8Nz8o+zIeKBneKIl3D3PdB3f Jsxw== 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:arc-authentication-results; bh=v/Ev3IImTtHU49L3aOleTbAd9lsECbzXiIZvpdNyY/8=; b=IagmhPp+iMNB7+tNqxTx0kvZ5MujzHss8Vp14DvHMqE0yQpFk5zF0UGg/VpuQwPyxX dQTd8oM9M+XEcisHn9HvJG4Co86n51nUtGgZ+/+Ztqg6gF3XKcez9y5BynB59WpupSV6 HdoNYQYyK/fmVwaB6KWHaZlTSECAn1vbyRUDaphqfeT+dlWz0xZHQ33VRH3TOaTmtjiL /4QFvz5m3/qPxsajXvc16E1UppRH0bdReFXULKnHjYGde0yG8rO2jiPTPR7zgIWvQwOj fymoPmauHPbBMnCqvXv9SKTnRGWnxys/FSiYkLgMQL8xbQt7T+oOAUu1cqO6ApxibYzQ DkqA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@roeck-us.net header.s=default header.b=ktRU5mqY; 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 n3-v6si14162576pga.622.2018.05.30.09.46.46; Wed, 30 May 2018 09:47:01 -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=fail header.i=@roeck-us.net header.s=default header.b=ktRU5mqY; 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 S1754012AbeE3QqR (ORCPT + 99 others); Wed, 30 May 2018 12:46:17 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:51167 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753816AbeE3QqN (ORCPT ); Wed, 30 May 2018 12:46:13 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=roeck-us.net; s=default; h=In-Reply-To:Content-Type:MIME-Version:References :Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To:Content-Transfer-Encoding :Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=v/Ev3IImTtHU49L3aOleTbAd9lsECbzXiIZvpdNyY/8=; b=ktRU5mqYChGxpoZ16O8AQSwdhN fXUHC9D30iQbMSEFi0jW2I7D4sMrDG4EHlXx6WfuN0hxBbZ8ll7BnpgazmWwMTSucCw/mdShcpUgA R5bvnwAknH34RusTVm4u+Kvg0t9DztymCkxKtbJ8wFCD+Wmv4qlpe0kpecZt1tb7GLIMICtRpUHeC RR8moIVxaKYPLFYxYO9SOVlm4BLTz9ebWS0ffqkHfuP7ZjBtoPwjI/xGbHHzFxqRw5KvoiP5ZiPbM oLhu6YGFbdT4ZPfMyTaRpUK3xyLi1oOcYOL4tZ2rafO2hbahVMsL03dyKuoLBi1Yn9OT5eFQD6iBq tNNLcyRQ==; Received: from 108-223-40-66.lightspeed.sntcca.sbcglobal.net ([108.223.40.66]:45478 helo=localhost) by bh-25.webhostbox.net with esmtpa (Exim 4.89) (envelope-from ) id 1fO4Ek-000lKe-Ij; Wed, 30 May 2018 16:46:11 +0000 Date: Wed, 30 May 2018 09:46:04 -0700 From: Guenter Roeck To: Tomer Maimon Cc: Rob Herring , Mark Rutland , jdelvare@suse.com, Avi Fishman , Nancy Yuen , Brendan Higgins , Patrick Venture , Joel Stanley , devicetree , Linux Kernel Mailing List , linux-hwmon@vger.kernel.org, OpenBMC Maillist , linux-pwm@vger.kernel.org, Thierry Reding Subject: Re: [PATCH v1 2/2] hwmon: npcm-pwm: add NPCM7xx PWM driver Message-ID: <20180530164604.GB8270@roeck-us.net> References: <1527588141-18639-1-git-send-email-tmaimon77@gmail.com> <1527588141-18639-3-git-send-email-tmaimon77@gmail.com> <20180529165617.GD2162@roeck-us.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.24 (2015-08-30) X-Authenticated_sender: guenter@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: guenter@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: guenter@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, May 30, 2018 at 06:44:58PM +0300, Tomer Maimon wrote: > Hi Guenter, > > Thanks for your prompt reply! > > > On 29 May 2018 at 19:56, Guenter Roeck wrote: > > > On Tue, May 29, 2018 at 01:02:21PM +0300, Tomer Maimon wrote: > > > Add Nuvoton BMC NPCM7xx Pulse Width Modulation (PWM) driver. > > > > > > The Nuvoton BMC NPCM7xx has two identical PWM controller modules, > > > each module has four PWM controller outputs. > > > > > > > I don't see it guaranteed that all future NPCM7xx devices will be PWM > > controllers, much less that they will be compatible to the chip really > > > > Actually all NPCM7xx family have PWM and FAN modules support, > > > > supported here. NPCM750, I presume ? I would suggest name the driver > > accordingly. > > > > The compatible name can not be a family name like nuvoton,npcm7xx-pwm, only > a specific chip name. (in our case the NPCM750 is the full modules SOC) > still you think i should change the driver name? (note: all of our NPCM7xx > unique modules drivers are named npcm7xx-*.c or *-npcm7xx.c) > drivers/watchdog/npcm_wdt.c contradicts that statement. Please discuss with the pwm maintainer. In hwmon, wildcards in driver file names are discouraged and will not be accepted. Our recommendation is to pick one chip from the family and use it as part of the file name. > > > As a generic pwm driver, not specifically tied to a fan controller, > > this driver does not belong into hwmon. It should be added to the pwm > > subsystem. Copying the maintainer and mailing list. > > > > In the NPCM7xx we have PWM and FAN controller modules, usually in the > aspect of our BMC clients the two module > are used together to control the fans. > > But because in the NPCM7xx the PWM and the FAN controller are separate > modules we > thought to do two separate drivers in the hwmon > is it possible? or you think it is better to do one hwmon driver for the > PWM and the FAN controller. > That depends on how closely the two modules are intertwined. If the pwm module is generic, it belongs into the pwm subsystem. It only belongs into hwmon if it can _only_ be used for fan control, eg if the data reported by the fan module is used by the hardware to control the pwm output based on some fan speed <-> pw value mapping which is programmed into the chip, and/or if the pwm output can only connect to a fan and nothing else, and if the relationship between pwm output and fan input is well defined. If both end up in hwmon, I don't see the benefit of having two separate drivers. That means two hwmon devices for the same fan or set of fans, one being all but useless in respect to output from the 'sensors' command. You'll have to convince me why that would make sense; I just don't see the point. In that case, I would also not see the point of having two separate devicetree nodes; to me, that would be similar to having two interfaces for a single serial line, one for receive and one for transmit. > note that we were going to submit soon also the FAN controller driver under > hwmon. > No problem with that as long as there are no wildcards in the file name. Guenter