Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp128048imm; Thu, 21 Jun 2018 15:14:35 -0700 (PDT) X-Google-Smtp-Source: ADUXVKIBW4h1+qq9ic3Rx6mmUmUAkEwSKMvYtzhf7qLIpFtWfUhSBCIrdeTfy/Vu81ydYGfQTB2R X-Received: by 2002:a63:6ec8:: with SMTP id j191-v6mr24285548pgc.232.1529619274979; Thu, 21 Jun 2018 15:14:34 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529619274; cv=none; d=google.com; s=arc-20160816; b=H2Z6pov3+RAHlw1nGFD9ef1d4R9h/Nf1ba+P+CCwtLeIXu/SX3tnZOcEsY6QpQIMFq SESynioUCb+laV6tqxBF7OrtZlgmj6AIhtmtxf9y1QxZWsRpDW3UxRx7fnOJdzNvxb7G vNWdXPN5SnjswhUvjMS0MsgbnLrq7ZWERDSOatvjPEYKYUUqOfdhewV5GTD1segdM/OD C7mHSWqRnf0N9/5HCYS+gCrHI4N4hV9qGdM+HvYP520KM2YXrJUkjkcn/qY/p5M+276t sq/EhXYCbGKuISpNLpbuxu8l42fIX9vIwcZ0uK1rcP8Hvd0LBkoVsmNiS/cxs3dLVUoe wXVA== 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=jB661XZkUcXDCamMgF4SAhGhzkPwaaxRlAn5oXfgDwY=; b=cNV0tfpTLmuu3SK2LGcSOgPceZVl+50gD1uRJRp3c4E7MFIuMN73yAsFqOaKJNxRdS N3+u1Eafna+CkCZqX57f34axSQhQjCVkXcc2LbRYr+kLkPQCNChRAwYzHhWOevnPUYlR OgXn2Ciq2h5tYWVwWJgQ+Lx3tBFcNWWANBBudrDfhtc5ADWRyVJKE4LdehZhDKQXj33s cjqH6kdNdShDZpOSZEGY4inJNNps09Qpf88VruX74eCBVWUZ+ql/5WMy+pMYx5/IWdgz l1M15SPcEPaAGp8IyWYfC+/Lfs9GDqy9efuicJyKeN67jACPhTeAf5fdW0CiVk9bgIog ta0w== 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 d65-v6si5971828pfg.142.2018.06.21.15.14.20; Thu, 21 Jun 2018 15:14:34 -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 S933906AbeFUWLL (ORCPT + 99 others); Thu, 21 Jun 2018 18:11:11 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:34197 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S933446AbeFUWLJ (ORCPT ); Thu, 21 Jun 2018 18:11:09 -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 w5LMAAPO024324; Fri, 22 Jun 2018 01:10:10 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 59FE162FF8; Fri, 22 Jun 2018 01:10:10 +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 v3 0/2] hwmon: Add NPCM7xx PWM and Fan driver support Date: Fri, 22 Jun 2018 01:09:55 +0300 Message-Id: <20180621220957.206638-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 NPCM7xx Baseboard Management Controller (BMC). The Nuvoton BMC NPCM7xx 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 NPCM7xx PWM and Fan driver tested on NPCM750 evaluation board. Addressed comments from:. - Guenter Roeck: https://www.spinics.net/lists/kernel/msg2834515.html https://www.spinics.net/lists/kernel/msg2835363.html 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 | 1073 ++++++++++++++++++++ 5 files changed, 1187 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