Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp172702imm; Tue, 3 Jul 2018 16:25:32 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdL3tyhM7QJxWUgjwUbhWyBlyGRqgYRHnC3jWkkxc1SRrCzPbVe166xs+3gfHfq9gYjLWU1 X-Received: by 2002:a62:152:: with SMTP id 79-v6mr28779467pfb.74.1530660332141; Tue, 03 Jul 2018 16:25:32 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530660332; cv=none; d=google.com; s=arc-20160816; b=EC9xquwBPjVDgNXPOCgMmBbKkiKk9BKZoWHZ7M/SA32w1nVf+CYNb1mUCUnahVd2Ut FaT60IhD9f+2IAW5E5FtquxFOs7Oajp8il1KllSejn9WrGyUetePasCODfvM8mjdMYGH vP7dkDDsNrwa/jky0tSYRh1QxOiPRiRmOpNyev6IPNDXxYiPt0c641S0j8DZ7e485pNu 4E7L+i5iEjSGyTM7ziya381RLXxO9r970hH3r5UAf5um9UBcdaxBYDh5rbn9+2+P1Axh WcipZ2mvVRISjNJtplGDAnZIQw6PYDQkknyWZuJZCZYrshUHkK005S7b/BqJrcjwF4Qb ODcA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :arc-authentication-results; bh=P9FFHINT/1Sy75SRkOiW/Z7wKyvHTHNuJBSmtRYUEc0=; b=qVPbTFRRdsGRCqpZmx/0QAnyCjA3UROPi9Cd2EwoQGP85fj1iFlOBQjUmZIT/c8qKl XzFNwB7dDTwNwnJGSFpcUSPx4gPYQuKt8NGBuSKrmJYOxCiRxIhctXMUhi780iYfwTPh fMWiazJ5QDJvSZrvk7FRqfl5teXgKOJbNx0cF0NMHwyDU45CPuYG+tZV6ZyduEQS7FXg tzxkQLo/bH8cxqGrs5d2CQbxGuZxBTXQVeadCG3szfa90FKTdysmAhIct608SbFr6kue PXqV2xhNb8HM2YWwXAaNoRREi+HWLNQmkeOyRpoahu+Qmb1E201QXz4Is84mZfR7d2Cd xyFg== 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; dmarc=fail (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 k14-v6si2241050pfd.23.2018.07.03.16.25.17; Tue, 03 Jul 2018 16:25:32 -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; dmarc=fail (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753074AbeGCXYh (ORCPT + 99 others); Tue, 3 Jul 2018 19:24:37 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:34902 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750764AbeGCXYd (ORCPT ); Tue, 3 Jul 2018 19:24:33 -0400 Received: from taln60.nuvoton.co.il (ntil-fw [212.199.177.25]) by herzl.nuvoton.co.il (8.13.8/8.13.8) with ESMTP id w63NNTUE003522; Wed, 4 Jul 2018 02:23:29 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 01EF46307B; Wed, 4 Jul 2018 02:23:28 +0300 (IDT) From: Tomer Maimon To: robh+dt@kernel.org, mark.rutland@arm.com, jdelvare@suse.com, linux@roeck-us.net, avifishman70@gmail.com, yuenn@google.com, brendanhiggins@google.com, venture@google.com, joel@jms.id.au Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-hwmon@vger.kernel.org, openbmc@lists.ozlabs.org, Tomer Maimon Subject: [PATCH v8 0/2] hwmon: Add NPCM7xx PWM and Fan driver support Date: Wed, 4 Jul 2018 02:23:24 +0300 Message-Id: <20180703232326.355718-1-tmaimon77@gmail.com> X-Mailer: git-send-email 2.14.1 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This patch set adds Pulse Width Modulation (PWM) and Fan tacho support for the Nuvoton NPCM750/730/715/705 Baseboard Management Controller (BMC). The Nuvoton BMC NPCM750/730/715/705 has two identical PWM controller modules, each module has four PWM controller outputs and eight identical Fan controller modules, each module has two Fan controller inputs. The hwmon driver provides sysfs entries through which the user can configure and get the duty cycle between 0 (disable the specific PWM) to 255 of particular PWM output port and read the fan rpm values. The driver support cooling device creation, that could be bound to a thermal zone for the thermal control. The NPCM750 PWM and Fan driver tested on NPCM750 evaluation board. Addressed comment from:. - Rob Herring: https://www.spinics.net/lists/kernel/msg2845438.html Changes since version 7: - Modify NPCM7xx sensor configuration description. - Modify clocks name. - Modify dt-binding documentation. Changes since version 6: - Kconfig, Makefile and definitions alphabetic order. - Error print prefix remove. - dt-binding documentation haven't changed. Changes since version 5: - Removing unnececery lock. - Modify dt-binding documentation. Changes since version 4: - Releasing Mutex before return from set PWM function. - dt-binding documentation haven't changed. Changes since version 3: - Fixing incorrect word spelling. - Removing npcm7xx_ in variable declarations. - All variable declarations in structure on a single line. - Removing variable unnecessary initialization. - dt-binding documentation haven't changed. Changes since version 2: - Adding hwmon documentation - Using dev_function instead pr_function - Removing all typecast - Removing unused definitions - Adding () in macros parameters. - dt-binding documentation haven't changed Changes since version 1: - Rename driver name - Adding Fan Controller support - Adding cooling device support - Modifying dt-binding documentation for Fan and cooling binding Tomer Maimon (2): dt-binding: hwmon: Add NPCM7xx PWM and Fan controller documentation hwmon: npcm750: add NPCM7xx PWM and Fan driver .../devicetree/bindings/hwmon/npcm750-pwm-fan.txt | 84 ++ Documentation/hwmon/npcm750-pwm-fan | 22 + drivers/hwmon/Kconfig | 10 + drivers/hwmon/Makefile | 1 + drivers/hwmon/npcm750-pwm-fan.c | 1057 ++++++++++++++++++++ 5 files changed, 1174 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/npcm750-pwm-fan.txt create mode 100644 Documentation/hwmon/npcm750-pwm-fan create mode 100644 drivers/hwmon/npcm750-pwm-fan.c -- 2.14.1