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=DKIM_ADSP_CUSTOM_MED, FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT 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 4E1D9C6778C for ; Tue, 3 Jul 2018 09:48:31 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 1252F23FBC for ; Tue, 3 Jul 2018 09:48:31 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1252F23FBC Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933294AbeGCJsR (ORCPT ); Tue, 3 Jul 2018 05:48:17 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:34829 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1754806AbeGCJsM (ORCPT ); Tue, 3 Jul 2018 05:48:12 -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 w639l3o2020998; Tue, 3 Jul 2018 12:47:04 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 83A8D63044; Tue, 3 Jul 2018 12:47:03 +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 v7 0/2] hwmon: Add NPCM7xx PWM and Fan driver support Date: Tue, 3 Jul 2018 12:46:59 +0300 Message-Id: <20180703094701.255662-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:. - Guenter Roeck: https://www.spinics.net/lists/kernel/msg2844266.html 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 | 87 ++ Documentation/hwmon/npcm750-pwm-fan | 22 + drivers/hwmon/Kconfig | 7 + 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