Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753103AbdDNCts (ORCPT ); Thu, 13 Apr 2017 22:49:48 -0400 Received: from bh-25.webhostbox.net ([208.91.199.152]:52247 "EHLO bh-25.webhostbox.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751544AbdDNCtq (ORCPT ); Thu, 13 Apr 2017 22:49:46 -0400 Subject: Re: [PATCH 1/3] mfd: cros-ec: Add functions to read mapped memory To: Moritz Fischer References: <1491602410-31518-1-git-send-email-moritz.fischer@ettus.com> <20170413210354.GA17134@roeck-us.net> Cc: Moritz Fischer , linux-hwmon@vger.kernel.org, Linux Kernel Mailing List , Devicetree List , Lee Jones , olof@lixom.net, jdelvare@suse.com, Rob Herring , Mark Rutland From: Guenter Roeck Message-ID: Date: Thu, 13 Apr 2017 19:49:43 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-Authenticated_sender: linux@roeck-us.net X-OutGoing-Spam-Status: No, score=-1.0 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - bh-25.webhostbox.net X-AntiAbuse: Original Domain - vger.kernel.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - roeck-us.net X-Get-Message-Sender-Via: bh-25.webhostbox.net: authenticated_id: linux@roeck-us.net X-Authenticated-Sender: bh-25.webhostbox.net: linux@roeck-us.net X-Source: X-Source-Args: X-Source-Dir: Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1348 Lines: 37 On 04/13/2017 03:53 PM, Moritz Fischer wrote: > Hi Guenter, > > On Thu, Apr 13, 2017 at 2:03 PM, Guenter Roeck wrote: >> On Fri, Apr 07, 2017 at 03:00:08PM -0700, Moritz Fischer wrote: >>> From: Moritz Fischer >>> >>> The ChromeOS EC has mapped memory regions where things like temperature >>> sensors and fan speed are stored. Provide access to those from the >>> cros-ec mfd device. >>> >> >> Turns out struct cros_ec_device already provides a cmd_readmem callback, >> which is widely used by other drivers. Why don't you just use it ? > > This is only actually set by the lpc version of the cros_ec. I2C and > SPI connected ECs Hmm - weird. I thought I saw it implemented for those, but I must have been struck by lightning or something. Let me check with Gwendal to see how this (ie its use from iio) is supposed to work on non-LPC systems. Guenter > emulate it. I can most certainly hook it up in the (spi,i2c) drivers, > but the implementation > for SPI and I2C needs to live somewhere. drivers/platform/chrome/cros_ec_proto.c > seemed to be a good place. > > Thanks for the feedback! > > Moritz > -- > To unsubscribe from this list: send the line "unsubscribe linux-hwmon" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html >