Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp7742235imm; Thu, 28 Jun 2018 08:40:19 -0700 (PDT) X-Google-Smtp-Source: ADUXVKJV775Nf2oopYjrZUj6RrpuyJVSgAhu604TSETwaFHy8PT2xyayoe8y2pG7ilL2OhT8BjJG X-Received: by 2002:a17:902:768a:: with SMTP id m10-v6mr10975163pll.293.1530200419537; Thu, 28 Jun 2018 08:40:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530200419; cv=none; d=google.com; s=arc-20160816; b=McR3FOynwSotRFzF/i0yK/Za24CX5qZR/BO6sZ4tquie6MZAbwL7Voa+AqeQ2aOGMs YS1iiFV0aQsyN14JZ7dTW54gzcfcfOQkSKwAIZg52DfEgRV6VebHDNfNS4PC6J1OVxUg 9nebq85qlaGwN1wgchwqWgm3gWdHjzOiT0NfmnuSe23uNw8OHFE3Y2aOf/7yJ7fJcCfq NMcZVWpdLh1kFmPUzrTnT7EgZ+oEVqIpdmmMYo9A3VXuOY5mgSrOgsx75LMqmqGJRRzW Wclg+MjK/iiKZGRFlD6gAWgQKsHkuL8Ug6GOpCNKN+kS+BVFWezhZSGGsRNPaO/Gfsm/ 8PWw== 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=uQAGDaNtwq5zWdRhbUbewmrZjP5fyp4EHS3DBriiGt4=; b=w2WArJvWnR4QXvs6ZOgY+3U1JSb9XJqq6E+bu6NpKAwcfylqRtsXSdTKv8r6Kti3Yp 71haRXkgNZmhEklgZ9+4AR5NmDo/hsJY/VnBCCXU7d6Nmgx/D3SwZfmETwckyb2dJ0pd vkBBS5fFMRN1W6+pOl49AB6OXAEk4RczUJRIwH/JhKQxofJM5Ha2QsX1mcNR6M31Ls1P q5xSZWNUAcGsa+1rFK0Flk/UKIpsE8SixkoWmmvxNARa99vrCYF6olrGFPiyTYCZFqzf yRgqbzbYb2gDBUWk9iHxvSgx3zPEejb6ej7Ezeg47gj8f4siiBQJaRRSujJui8TK7gA3 qNTg== 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 e7-v6si6362351pgf.317.2018.06.28.08.40.05; Thu, 28 Jun 2018 08:40:19 -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 S1753698AbeF1LsE (ORCPT + 99 others); Thu, 28 Jun 2018 07:48:04 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:34611 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1753612AbeF1Lr7 (ORCPT ); Thu, 28 Jun 2018 07:47:59 -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 w5SBklpw012636; Thu, 28 Jun 2018 14:46:47 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 4379662E70; Thu, 28 Jun 2018 14:46:47 +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 v6 0/2] hwmon: Add NPCM7xx PWM and Fan driver support Date: Thu, 28 Jun 2018 14:46:44 +0300 Message-Id: <20180628114646.343734-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. 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/msg2838177.html - Rob Herring https://www.spinics.net/lists/kernel/msg2838247.html 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 | 1064 ++++++++++++++++++++ 5 files changed, 1181 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