Received: by 2002:ac0:a581:0:0:0:0:0 with SMTP id m1-v6csp2838412imm; Sun, 24 Jun 2018 05:47:15 -0700 (PDT) X-Google-Smtp-Source: ADUXVKKAawT0I+uq5LBj9LBbBuJlmSlbqdagLBb13AxNkknHAWX9/sv0UxL+AuvDdDVKoP3kXSEw X-Received: by 2002:a65:4d91:: with SMTP id p17-v6mr7134188pgq.296.1529844435519; Sun, 24 Jun 2018 05:47:15 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1529844435; cv=none; d=google.com; s=arc-20160816; b=Kg7oKuZs7ctQvMH6iw3AtC5UWgBtvoVdaCZzYOBDI0xvM4vLW60eNG0t0tZXN4qWVS uKDlDbz+Xk8rJiyLvJeeByP05qdR+Q+u25GGcxnXxJTaifKAqS95jDAAcbh8VmNsx7ig XdT+IsZ65BgiP2CAmh+6qIc/90ZsLe+wvRphDKAn+Y15EKtyWLX2oA3GX3ADPd3hcBjF hu0Az8bBNwH28j0+5GP1AGpu4qfovwNnhBwTV5ZCFBUAPbNHsPpLPYV4AhoK4qcg58Ri 2SeV8w7qzxon258HrhUh9zMlmVXSyQ4hES2uX/h5Zc4cJ7wexoliY9XFPzkdwh5c1/vi B9QA== 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=8XKNLaU9OfQ2cpwJw/Qu4jJS2y3lfKo8J35Nc2Jxf3g=; b=0HOInNvF2pWvGGDmeR2guQ32wYqOC21A5/Y4Osjr/Ki8r4f/V9WiL+n3h6xvl8uoy1 oPkskVSn+6oQfoQ5Zhpj+9/AFm65w0K5XR2oSvW7Dz9kS8L760CDgdhjOMMCAm0Sf9Fy SIRnR96TtSXbloWgariQmS5eJtGGSPAgO+R0PRfg2KdNniz7s45ucsVpNB+IVPfG5N1g O16u6ZMA/c4V2QqvWEH+BgSckcW11wxfiZpHn992PkHB1cm0CVoQMa6Hzjia1xVyZKDg lTmwHLUfL5v7co182vJsSNC4c4YbeTou69LEQHTB1v0brycu4/hMogP+jKGdo4t4lx1h nncQ== 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 c13-v6si11653198pfh.215.2018.06.24.05.47.01; Sun, 24 Jun 2018 05:47:15 -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 S1751487AbeFXMqO (ORCPT + 99 others); Sun, 24 Jun 2018 08:46:14 -0400 Received: from 212.199.177.27.static.012.net.il ([212.199.177.27]:34308 "EHLO herzl.nuvoton.co.il" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750808AbeFXMqN (ORCPT ); Sun, 24 Jun 2018 08:46:13 -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 w5OCfv5T003902; Sun, 24 Jun 2018 15:41:57 +0300 Received: by taln60.nuvoton.co.il (Postfix, from userid 10070) id 32A8862FF8; Sun, 24 Jun 2018 15:41:57 +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 v4 0/2] hwmon: Add NPCM7xx PWM and Fan driver support Date: Sun, 24 Jun 2018 15:41:53 +0300 Message-Id: <20180624124155.82412-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 comments from:. - Guenter Roeck: https://www.spinics.net/lists/devicetree/msg235294.html 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 | 1070 ++++++++++++++++++++ 5 files changed, 1184 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