Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp4053558imm; Mon, 25 Jun 2018 08:59:10 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKU0zRrLYzuq0e0wuqMi47xoqfpjpZrFq2iGNn/X+cm3H5/VE6WRfvBpCjct2UIbLd6enPc X-Received: by 2002:a63:5fc1:: with SMTP id t184-v6mr10835213pgb.183.1529942350685; Mon, 25 Jun 2018 08:59:10 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529942350; cv=none; d=google.com; s=arc-20160816; b=hUFwFx7eah5P9pCODdiNKT3Ja+SuqZokUiTI2Wtn6UUe669P9q/hhUb2AirTeY3cXC oLw7IJ127lCDfrWZ2OzXZO2nC7VPr5s5MTeE4Ss2S2+8/kBm6VwHbbf2lpIlQCduF+iA 5hbL2+imWZnXNVpW/TZDXeMg85QBdADBjsAY3BkPsvrXDnm2gLfP4jez89DNnVSJyrkp 5BjD+ETChWf0Ck+AgdZYTzVRSe/0jnMZVAneYcia/YPPWS9uj1glT/MkR/P1AvXRn3hr h2oGYgFcHDilnhDgB8HTBitfs6jjdwbE37/C4ypuWIZY2tvEP9SqAUf1UqpDEohsLP6x ztPw== 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=2nkkZbpfzFv6sqo+VRQ3ccCXx4d9CWwcPgOT44kGYt0=; b=L6mu+p5UVo5sT+Fy7liQH+snlTyAHTkiEhe2YpUQd28W5AN8AbCiV2Q9+OFH22vvlM gfMmPLJI0I8LkKTshgjX6b8uDMsz1VuSv0ADz7D30Dm1/Y6ls0EkTkfu3vlZ8nPH0CAs O4ol9cIAcC/xqv6Nv5peEIysmdpfD735OF63SKoInHbJAjeskVq7nr8LYDjK1RlRqz4e AzduiQALkZ3GMrA8OvHIRyX278W1AFMB90iAIws4SGTfrcuG0RY/stCbL1Hxb4SQzXYe oiiu9pL7TloRiOQMEvyrNuhvrO1+/x+BzeDyfvbE+mUrT4I3fGJmFuYoHF97CwRcqAMF bjxA== 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 60-v6si14779782ple.65.2018.06.25.08.58.55; Mon, 25 Jun 2018 08:59:10 -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 S1754017AbeFYP6Q (ORCPT + 99 others); Mon, 25 Jun 2018 11:58:16 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:34475 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752146AbeFYP6O (ORCPT ); Mon, 25 Jun 2018 11:58:14 -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 w5PFt5iL001561; Mon, 25 Jun 2018 18:55:06 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 5005162FF8; Mon, 25 Jun 2018 18:55:05 +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 v5 0/2] hwmon: Add NPCM7xx PWM and Fan driver support Date: Mon, 25 Jun 2018 18:55:02 +0300 Message-Id: <20180625155504.152079-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:. - Dan Carpenter: https://www.spinics.net/lists/kernel/msg2837950.html 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 | 7 + drivers/hwmon/Makefile | 1 + drivers/hwmon/npcm750-pwm-fan.c | 1071 ++++++++++++++++++++ 5 files changed, 1185 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