Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1868435imm; Mon, 3 Sep 2018 11:33:23 -0700 (PDT) X-Google-Smtp-Source: ANB0VdY8UgxWCk1GUd7M1KAJq1q+pig7XbL1QJ9MAWln/7dOEwSDJzoYQHbCWRKJllbbYBUvASVI X-Received: by 2002:a62:4898:: with SMTP id q24-v6mr31201375pfi.22.1535999603558; Mon, 03 Sep 2018 11:33:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535999603; cv=none; d=google.com; s=arc-20160816; b=vzss/OI4hNM7v08BVqIOGf3IB6IBuCeiV6Im4Ae1s/M34m+mC6eVYq+yse4ijZQF51 GDLmMM7wwBUv1UQRe7TeZsxxJ7kXu8AERwZT8+dk6W8HM/6cKtRkdHSTwY7Pe1Tib/E7 bajOwoyDalsD+aUmtiRoDHQqJZEcgbWElMarSD+N662WaIlPVTirkp5ccSgP8Z0aj7nu o/Iw61Y8SlTtWMXJGEd4CwTU2Xkc2xavuQ2MHkg3qhZw86WbEzYZA6Rq67pVPEOUjN4t QFpGsbZA7YksBV6xzdgaYWXtN6YoR7hHqEhjJGNmDMtVqVzH3+9ea/xizo5ON/U51s/w o7cw== 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=0jZJ0JBmB3TAdm0LG7EBuyxLYRy3bCh9BozrnB1RkrQ=; b=gKHsJ1OlZIVq7y5PU3FjyCPbgpNLyVHuW/EehTIGX4lckbqgtswDWcGTwnnGyqlwEz Tw/thkJZ1ioUYIS6dWiq28IucI2DLMqAtH1jRXAOYF34tyf9IODMUaCFn28CTaYWr6JW o3Z8OUV6T7NcZ2vcNjpyfOUmi7JroK0/eHQr9iYzqrpTPv0TcYlFZRo6AO9NvQEGER7F GbAqkvQCPel4y1jOXN6C7FWXs8dDZr5j1/9mZi0pnhCacCL6pJyMdkuOkXXIxnsA1DAl pR9wmSVff2HUFzRMzxRlky2Dn7AX1TsK5vcT2DHm4IwxMyDD2OF6T0UD9LQmTiiVtJTt drEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=O+My7R7M; 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=pass (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 m3-v6si18424255pld.90.2018.09.03.11.33.08; Mon, 03 Sep 2018 11:33:23 -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=pass header.i=@gmail.com header.s=20161025 header.b=O+My7R7M; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727607AbeICWx2 (ORCPT + 99 others); Mon, 3 Sep 2018 18:53:28 -0400 Received: from mail-pl1-f193.google.com ([209.85.214.193]:37579 "EHLO mail-pl1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727430AbeICWx1 (ORCPT ); Mon, 3 Sep 2018 18:53:27 -0400 Received: by mail-pl1-f193.google.com with SMTP id f1-v6so502391plt.4; Mon, 03 Sep 2018 11:32:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=0jZJ0JBmB3TAdm0LG7EBuyxLYRy3bCh9BozrnB1RkrQ=; b=O+My7R7MIRDAWHFtXXqgVvN5UKs9aoRSyasgctFJY7JaDJ92yXmqVvS22a2VB6yXlT iMlpuBJKxruKos7OLaYkz4e7T5XFknXfL58GBhHnTaRQ0uwXjT45RH+eSG3pti750orV 7/apeLJ+HQ+MncbChOTgiCotQYduOVuKAaAEUgxkaPR5ece3KTXlO+YtyB0OxZUHAf+1 X/BAzf6UB7ED5dw54eMGQZABacH5rQaVGycnlBRQu1E6wyUfaOhrl97grEUfRrNO0HZ7 Cr8nEvgHlKqLJMtUorNo2gKMkV0O5BMQH3U7vNWGZ9qH8sSDpbcyWzfcbzdfq97YJCSw 97FA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=0jZJ0JBmB3TAdm0LG7EBuyxLYRy3bCh9BozrnB1RkrQ=; b=NJBEtJiCi0HnEDvncvo1MZOPzJLE6SGzw5eyVZPV0c2IPPXo5B+4ggjSGCPSlYITJs 8yIMsSrhzLeCZR33KhrgZ/bwj1jRX/UftbJruNjieDq3Lgz+1i5G6P6g5Tr7g8a0HhvY uFJTjS+bJIIykz9sAeNNcoDhp9rzKYu5IirfJX6NnGcjQvjaNxLLRY6hK0sGEnosyp4m ngkovGFm5CjgBOjQ7PLm6qVSDVC6j0dubF8txrTuo3NsaO9FEI+Zryow82rm0YjK6+JW +dleKwBUQPBtYKFAykcc5AmO6/ttuiLcHWyKk7vp9B0TzKPXtCZLBItYj0Hispq06zVN EBCg== X-Gm-Message-State: APzg51AKPLvi//cM1WYH46vWvDBZMcxcZl9BnQ2WVzXkV4irAHQLvaBZ bisojkDtb3ERceTYuF2Y4MY= X-Received: by 2002:a17:902:7586:: with SMTP id j6-v6mr29425119pll.295.1535999522705; Mon, 03 Sep 2018 11:32:02 -0700 (PDT) Received: from [10.10.115.170] ([192.19.218.250]) by smtp.gmail.com with ESMTPSA id g15-v6sm38244650pfg.98.2018.09.03.11.31.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 03 Sep 2018 11:32:01 -0700 (PDT) Subject: Re: [PATCH RFC 0/2] hwmon: Add RPi PoE HAT fan driver To: Stefan Wahren , Guenter Roeck Cc: Rob Herring , Eric Anholt , bcm-kernel-feedback-list@broadcom.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, serge@raspberrypi.org, linux-rpi-kernel@lists.infradead.org, Mark Rutland , Phil Elwell , linux-hwmon@vger.kernel.org, Jean Delvare , linux-arm-kernel@lists.infradead.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> <829194253.51526.1535908415057@email.1und1.de> From: Florian Fainelli Message-ID: <642d46f3-7c1d-2b97-5d49-8772c75be530@gmail.com> Date: Mon, 3 Sep 2018 11:31:48 -0700 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.0 MIME-Version: 1.0 In-Reply-To: <829194253.51526.1535908415057@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 9/2/2018 10:13 AM, Stefan Wahren wrote: > Hi Guenter, > >> Guenter Roeck hat am 2. September 2018 um 18:49 geschrieben: >> >> >> 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. > > thanks for your explanation. Now i think i understand and sorry for the confusion. We need a driver which translate the pwm values into the mailbox properties. "My" RFC series is only a starting point (not intended for merge and not an option) for a discussion and i'm perfectly fine with 2). > Both options would be feasible in general. I only wanted to know your opinion before i start to implement one of them. Is not there a way to expose the PWM pins directly to the kernel instead of going through the firmware to do that for us? I am just asking because sometimes this appears to be possible, guess not in this case? -- Florian