Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1104447imm; Sun, 2 Sep 2018 09:51:19 -0700 (PDT) X-Google-Smtp-Source: ANB0VdbpPSz3EK8Lgrxxa86KmNX5fXfCF3BFV+3VNZ+i5P53k7w4gIZjbwvOn8fiq+M3TbbnJ+UE X-Received: by 2002:a62:d544:: with SMTP id d65-v6mr25418784pfg.107.1535907078961; Sun, 02 Sep 2018 09:51:18 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535907078; cv=none; d=google.com; s=arc-20160816; b=Dy+ZFMaN2w6l+3ROCiPt8k678RWyAsGpGOp5xPp2pEbuwMjOnTXUPOBtI7ZKWXJhPP Wbm3u8Bv0GiHxUS3g69DZ+CKFdJSGMMYELr+NgPBugULlUW854towklIr/CkxkYBLbnN kw2HkNr2/hp+2L9J/fcJvFU7+SXtAplU7Z4tHUSoyaKz65SsBWTVfhj5Ky7NGv3DAkfw o1k273pWkEAxZhzKrmKrObPiESGCKxUp4Ar0aHD6R/mTrdLQ6rYERzGl2JwrUnEXZsCk yXTC4EWpExE8AouGUU907DqCgK3AovUHgRzzkoXllQY8EzhxbfI1yNYxYq1tF7YsYr3g vGHg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=HJo10hAbdSnGmW/9lZut1t871eKQQQ+SyvkQnds/Lco=; b=O1ArY3UgAafOTSrpe0D/drj6kvGtVb6aB7Ww04/AK1kl5owTiOV4sBryEjCsrvTE47 n8eI7rbchJl1wN7+qzc1mWPCHS8hGXpRTPPoDIMAWPICuKKMq80VG/0aUK9UqebHBywr eMJuweBP5hZrzLkTAkYQSlRxdxuO3wMUTPWNq5qQlFqNS0UuBf56y7SH3lj7eM8Nv8Z3 zjeOI908ad+xBySY67oVbDhwEEEtps1VME8+aSH6k3N1XIaXPudJeu0lHTvUILB0DioW HDxXEKhmXt+OmNIPwWCIXYffFL8Xvw4c3cgTirXwa1s+9cVR/+10Zj1CuHt3YlWypSXi pExQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nbMPCj62; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id s9-v6si14928682pgk.384.2018.09.02.09.51.03; Sun, 02 Sep 2018 09:51:18 -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; dkim=fail header.i=@gmail.com header.s=20161025 header.b=nbMPCj62; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727024AbeIBVGW (ORCPT + 99 others); Sun, 2 Sep 2018 17:06:22 -0400 Received: from mail-pg1-f193.google.com ([209.85.215.193]:41731 "EHLO mail-pg1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726065AbeIBVGW (ORCPT ); Sun, 2 Sep 2018 17:06:22 -0400 Received: by mail-pg1-f193.google.com with SMTP id s15-v6so7525560pgv.8; Sun, 02 Sep 2018 09:49:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HJo10hAbdSnGmW/9lZut1t871eKQQQ+SyvkQnds/Lco=; b=nbMPCj62SHUbrxVlXEy80GrEhcLpgvNhOdWpgqK7g6+PM4zrOwTFlQDHbVLp0qUqsE tXWx4lEris5p6FJS+Mvlmyc/HLtIX4YsURSJM4PwXd7Ad7VWVv020GMsbTsXLxlpR6k0 EMJ4zfU0y4fenPWGYb/6lXSg76nEtMK4Bs3SLpPm+IaXzafcgn5GJxR4U7DNtuwTneHo wLRMznP6QwIyb0icpVIdCUaw0Y+YrOkNBEsaDCrpMRvObnS0IyHqi7n01urjpQmIlwT5 1xleTLUogTtqqxGhpboQR5LG/gRt0G32kfJylOCIR1wAlWfNoNR17kKOMUc4xXmQpbFi Fc/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:to:cc:references:from:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HJo10hAbdSnGmW/9lZut1t871eKQQQ+SyvkQnds/Lco=; b=g+HxvzNtrgwccbDbb+cJp2wiud+6+hNstwRSUCsEyfMc4uRi0eNkx1x+nV+LzkcGP8 6EDzk9BGC8Vh/TAYjo5h57/01X1OtH1az7rENrQMqLCj57M23vvtWrqGPRkZWN+UGNRf h0d5m++LHzNmspB3co8R7QR65JRIT5zjUe5pgtVjt6ahtgfoRUX5/o0Lar2PgA8paBNW ZohAlKl4IBk/ewz8dai0OZmdH8hrLmQe4ouHsNPvwJL0Tjr6l5VVQXAzRtk5+7wfNn9I 1GjCfYmrqmDG2k4IES7p/YD2cGlMayPTMj+su7LZsXWajVPU8CG2wDoSedhNJoIPbaMQ SSmw== X-Gm-Message-State: APzg51CbP/0xN7Cwy4HxNxpeF0QKLX8I1+g0yEQ5/mXYZIhyMQOEtsO+ eL0M/x/veIRKDnzNwPy4qOY= X-Received: by 2002:a63:d645:: with SMTP id d5-v6mr22796487pgj.450.1535906997782; Sun, 02 Sep 2018 09:49:57 -0700 (PDT) Received: from server.roeck-us.net (108-223-40-66.lightspeed.sntcca.sbcglobal.net. [108.223.40.66]) by smtp.gmail.com with ESMTPSA id f75-v6sm27492533pfk.85.2018.09.02.09.49.55 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 02 Sep 2018 09:49:56 -0700 (PDT) Subject: Re: [PATCH RFC 0/2] hwmon: Add RPi PoE HAT fan driver To: Stefan Wahren Cc: Florian Fainelli , linux-rpi-kernel@lists.infradead.org, Eric Anholt , Phil Elwell , Jean Delvare , Mark Rutland , Rob Herring , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-hwmon@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, serge@raspberrypi.org References: <1535887251-29515-1-git-send-email-stefan.wahren@i2se.com> <99ca4f6d-d2b2-36e7-9f27-189df379cfaf@roeck-us.net> <67224834.51159.1535905604770@email.1und1.de> From: Guenter Roeck Message-ID: Date: Sun, 2 Sep 2018 09:49:54 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <67224834.51159.1535905604770@email.1und1.de> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 09/02/2018 09:26 AM, Stefan Wahren wrote: > Hi Guenter, > >> Guenter Roeck hat am 2. September 2018 um 16:23 geschrieben: >> >> >> On 09/02/2018 04:20 AM, Stefan Wahren wrote: >>> This series is an early stage of the hwmon driver for the fan on the >>> Raspberry Pi Power over Ethernet HAT [1]. At the end this should use a >>> Device Tree Overlay. >>> >>> Changes by Stefan based on [2]: >>> - reformat the downstream patches for submission >>> - drop reboot notification >>> - fix remaining checkpatch issues >>> - add COMPILE_TEST to Kconfig >>> >>> The driver is mostly copy & paste from pwm-fan, which isn't good. Personally >>> i see two options: >>> >>> 1) integrate the driver function into the pwm-fan driver (new compatible) >>> 2) implement the core function as a PWM driver and use the pwm-fan driver on top >>> >> >> I don't really see the point of thise driver. Why not implement either of those ? > > i'm not sure about your question. Since the fan is placed over the SoC, the fan should takes care of the SoC temperature. AFAIK the firmware should have exclusive access to the I2C. So why we need this mailbox interface instead of a I2C driver. > The driver sets pwm values. The pwm-fan driver sets pwm values. A pwm driver sets pwm values. The pwm-fan driver uses a pwm driver to set pwm values. You appear to be arguing that the pwm-fan driver for Rpi is different than a pwm-fan driver for all other hardware and should _not_ use a pwm driver to set pwm values. As you don't understand my question, I don't understand your rationale either. I will require detailed explanations why 2) is not feasible, and why 1) is not feasible either. Until then, NACK. Guenter >> 2) sounds like a perfect fit to me. >> >> Guenter >> >>> [1] - https://www.raspberrypi.org/products/poe-hat/ >>> [2] - https://github.com/raspberrypi/linux/commit/0f937c8dc3201ebffa6c617c616fd7c65db65959 >>> >>> Serge Schneider (2): >>> dt-bindings: hwmon: Add RPi PoE HAT documentation >>> hwmon: Add RPi PoE HAT fan driver >>> >>> .../devicetree/bindings/hwmon/rpi-poe-fan.txt | 55 +++ >>> Documentation/hwmon/rpi-poe-fan | 15 + >>> drivers/hwmon/Kconfig | 11 + >>> drivers/hwmon/Makefile | 1 + >>> drivers/hwmon/rpi-poe-fan.c | 414 +++++++++++++++++++++ >>> include/soc/bcm2835/raspberrypi-firmware.h | 2 + >>> 6 files changed, 498 insertions(+) >>> create mode 100644 Documentation/devicetree/bindings/hwmon/rpi-poe-fan.txt >>> create mode 100644 Documentation/hwmon/rpi-poe-fan >>> create mode 100644 drivers/hwmon/rpi-poe-fan.c >>> >> >