Message ID | 20221101095156.30591-1-billy_tsai@aspeedtech.com |
---|---|
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2857824wru; Tue, 1 Nov 2022 03:03:54 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6WP/wSUM9ZPPTjWJz30wJ83mKWxjVSFpPsqD3Fx++V3rR8nwJjXn7cOD6hWvjFh9LSzXO8 X-Received: by 2002:a63:87c2:0:b0:46e:9bab:3064 with SMTP id i185-20020a6387c2000000b0046e9bab3064mr16942481pge.255.1667297034723; Tue, 01 Nov 2022 03:03:54 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667297034; cv=none; d=google.com; s=arc-20160816; b=hE1To/BzYdptOv9zl7P33qQhNcmEQh/otSMoqmUZvVPMCaqQzrXkoMIdqoUxkZX8I+ uhV1Lxrth9WG4mPheH1Fk1sKmoo+ZYKA+GhWnyBLZBPn9gFscRkUAB9Z4tfwGsAhnLPc cdC6ChfA3h7/q8I82Wgcvo26R/rQ4LfXa6Xs2zXf320rPlUV+Fx3KcdYnkGjqOuUWdeE beSzp+QiTuPJg2+H+2SPeh2hqQSNPLwasWPpliJXMWJ7YhACVM8xOQ+0GSybyeXAWokh 6XlCgbqmbeuVEPPvU8kpckdKxfRZrwuE/EAlDVWc3DXoUdehOm73pFovmTe0vykLnCC1 PgpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:to:from; bh=Prowbb1gri3JAj05LnzvAcB6UDy230Cw/R9cPWXVOx8=; b=aRGXQ+rxSQdExj8Iz/qproQYC/t6OjmXhv4kvVay3iKwY89QmAZlPWzyXo2gmEBDYg WN+90pf7hKjhcW9kir/NehQFSQhqGDu4l7YP++5lFjPJMtayBuxW+lKVPiFtCml9Y2Gg fQcK2N5HW0LTuQudEBY2KwYLRw4SojvMWL4J2ZOEUHg5uhpVfZSlPX2nANeCffVxhvRV Fm25atLBW5r1tJTP3DQ11YvSV8Wzt06dcb8QUStT4fMnJpGhtEspRvYeZWCFgx0Xqq0O mswJC1kuPLgjjkw6gL7vfDaOLaXv2yAf+475ocKPl0JuDW9jp6AmxA2DV57cr4Fu9XqQ eRZg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id pg7-20020a17090b1e0700b0020dbb8f3695si15267609pjb.172.2022.11.01.03.03.41; Tue, 01 Nov 2022 03:03:54 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230314AbiKAJue (ORCPT <rfc822;kartikey406@gmail.com> + 99 others); Tue, 1 Nov 2022 05:50:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57054 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229912AbiKAJub (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Tue, 1 Nov 2022 05:50:31 -0400 Received: from twspam01.aspeedtech.com (twspam01.aspeedtech.com [211.20.114.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 056CB1900B for <linux-kernel@vger.kernel.org>; Tue, 1 Nov 2022 02:50:28 -0700 (PDT) Received: from mail.aspeedtech.com ([192.168.0.24]) by twspam01.aspeedtech.com with ESMTP id 2A19RBEV025158; Tue, 1 Nov 2022 17:27:11 +0800 (GMT-8) (envelope-from billy_tsai@aspeedtech.com) Received: from BillyTsai-pc.aspeed.com (192.168.2.149) by TWMBX02.aspeed.com (192.168.0.24) with Microsoft SMTP Server (TLS) id 15.0.1497.2; Tue, 1 Nov 2022 17:50:21 +0800 From: Billy Tsai <billy_tsai@aspeedtech.com> To: <jdelvare@suse.com>, <linux@roeck-us.net>, <robh+dt@kernel.org>, <joel@jms.id.au>, <andrew@aj.id.au>, <lee.jones@linaro.org>, <thierry.reding@gmail.com>, <u.kleine-koenig@pengutronix.de>, <p.zabel@pengutronix.de>, <billy_tsai@aspeedtech.com>, <linux-hwmon@vger.kernel.org>, <devicetree@vger.kernel.org>, <linux-arm-kernel@lists.infradead.org>, <linux-aspeed@lists.ozlabs.org>, <linux-kernel@vger.kernel.org>, <linux-pwm@vger.kernel.org>, <BMC-SW@aspeedtech.com>, <garnermic@meta.com> Subject: [v2 0/3] upport pwm/tach driver for aspeed ast26xx Date: Tue, 1 Nov 2022 17:51:53 +0800 Message-ID: <20221101095156.30591-1-billy_tsai@aspeedtech.com> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 Content-Transfer-Encoding: 7BIT Content-Type: text/plain; charset=US-ASCII X-Originating-IP: [192.168.2.149] X-ClientProxiedBy: TWMBX02.aspeed.com (192.168.0.24) To TWMBX02.aspeed.com (192.168.0.24) X-DNSRBL: X-MAIL: twspam01.aspeedtech.com 2A19RBEV025158 X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,SPF_HELO_NONE, SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1748287655292391360?= X-GMAIL-MSGID: =?utf-8?q?1748287655292391360?= |
Series |
upport pwm/tach driver for aspeed ast26xx
|
|
Message
Billy Tsai
Nov. 1, 2022, 9:51 a.m. UTC
Unlike the old design that the register setting of the TACH should based on the configure of the PWM. In ast26xx, the dependency between pwm and tach controller is eliminated and becomes a separate hardware block. One is used to provide pwm output and another is used to monitor the frequency of the input. Therefore, this patch serials implements them by writing the two driver "pwm-aspeed-ast2600.c" and "tach-aspeed-ast2600.c". The former is following the pwm subsystem which can apply the existed driver to controller the fan(pwm-fan.c), beeper(pwm-beeper.c) and so on. The latter is following the sysfs interface of hwmon to creat the node for fan monitor. Changes since v1: - tach: - Add the document tach-aspeed-ast2600.rst - Use devm_* api to simplify the error cleanup. - Change hwmon register api to devm_hwmon_device_register_with_info Billy Tsai (3): dt-bindings: Add bindings for aspeed pwm-tach. pwm: Add Aspeed ast2600 PWM support hwmon: Add Aspeed ast2600 TACH support .../bindings/hwmon/aspeed,ast2600-tach.yaml | 48 ++ .../bindings/mfd/aspeed,ast2600-pwm-tach.yaml | 76 +++ .../bindings/pwm/aspeed,ast2600-pwm.yaml | 64 +++ Documentation/hwmon/tach-aspeed-ast2600.rst | 28 + drivers/hwmon/Kconfig | 9 + drivers/hwmon/Makefile | 1 + drivers/hwmon/tach-aspeed-ast2600.c | 484 ++++++++++++++++++ drivers/pwm/Kconfig | 10 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-aspeed-ast2600.c | 325 ++++++++++++ 10 files changed, 1046 insertions(+) create mode 100644 Documentation/devicetree/bindings/hwmon/aspeed,ast2600-tach.yaml create mode 100644 Documentation/devicetree/bindings/mfd/aspeed,ast2600-pwm-tach.yaml create mode 100644 Documentation/devicetree/bindings/pwm/aspeed,ast2600-pwm.yaml create mode 100644 Documentation/hwmon/tach-aspeed-ast2600.rst create mode 100644 drivers/hwmon/tach-aspeed-ast2600.c create mode 100644 drivers/pwm/pwm-aspeed-ast2600.c