From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1755461AbbG0B1V (ORCPT ); Sun, 26 Jul 2015 21:27:21 -0400 Received: from mailout3.w1.samsung.com ([210.118.77.13]:30236 "EHLO mailout3.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755374AbbG0B1R (ORCPT ); Sun, 26 Jul 2015 21:27:17 -0400 X-AuditID: cbfec7f5-f794b6d000001495-7b-55b588f20764 Message-id: <55B588EE.4060103@samsung.com> Date: Mon, 27 Jul 2015 10:27:10 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-version: 1.0 To: Sebastian Reichel Cc: "Pallala, Ramakrishna" , "linux-kernel@vger.kernel.org" , "linux-pm@vger.kernel.org" , MyungJoo Ham Subject: Re: [PATCH v2] power: max17042_battery: add HEALTH and TEMP_* properties support References: <1432438918-31002-1-git-send-email-ramakrishna.pallala@intel.com> <20150724144651.GE27569@earth> <55B57C85.4070309@samsung.com> <20150727012235.GA24229@earth> In-reply-to: <20150727012235.GA24229@earth> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFjrHLMWRmVeSWpSXmKPExsVy+t/xq7qfOraGGkzqVbR4/cLQ4vKuOWwW n3uPMFrcblzBZrHwzU0mi9O7SxzYPBbvecnksWlVJ5tH35ZVjB6fN8kFsERx2aSk5mSWpRbp 2yVwZdx6/oGx4Bl3xdZlSxkbGDdxdjFycEgImEgc7xLsYuQEMsUkLtxbz9bFyMUhJLCUUeL/ 30PMEM4XIGfKMTaQKl4BLYmDH5eC2SwCqhIP3+1hBLHZBIwlNi9fAhYXFYiQWL76JCNEvaDE j8n3WEBsEQE1ifeXnoLZzAL3GSXmT68GsYUFoiUmPz3FArGsjVmiqesiE0iCU0Bb4tvbd2wg lzIL6Encv6gF0SsvsXnNW+YJjAKzkKyYhVA1C0nVAkbmVYyiqaXJBcVJ6blGesWJucWleel6 yfm5mxghofx1B+PSY1aHGAU4GJV4eC+obA0VYk0sK67MPcQowcGsJML7OAooxJuSWFmVWpQf X1Sak1p8iFGag0VJnHfmrvchQgLpiSWp2ampBalFMFkmDk6pBsY6S2mRkz7TjT+29358rdEU 2HFEe4G738nc40ZtbBxi9QeT9u5453EyJz8x/VPccavlK1cUi2zgyzO3jp0Z5ndVR0jCK/fl rD3vDHVt+F+evLU5i01LjbH/pd/e7/VXT7wM/atYlbXzkoH3xTdHFXN+v7e0nMghv1tgiq7h Pjb3ttb7lvumn1BiKc5INNRiLipOBADUS8AiYQIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 27.07.2015 10:22, Sebastian Reichel wrote: > Hi, > > On Mon, Jul 27, 2015 at 09:34:13AM +0900, Krzysztof Kozlowski wrote: >>>> [...] >>> >>> I missed this email (may be overlooked it). To have the >>> interrupts enabled we need the config registers(0x1Dh) bit's >>> BIT(9), BIT(4) and BIT92) should be 1 and BIT(8) should be 0. >>> >>> Can you dump the status(00h), Talrt(02H) Temp(08h) and >>> config(1Dh) registers values and share? >> >> Thanks for responding. The issue was in BIT(8) which was set to default >> value of 0x1. This would mean to use external sensor but the board does >> not have it. >> >> This is a DT platform and there is no initial config data so all >> registers are set to default values. >> >> Anyway everything seems to work as expected, thanks for explanation. > > So I guess the bit should be set to 0 during probe. Maybe with a > boolean DT property "maxim,has-external-sensor" for setting it > to 1. Yes, something like this but it may be not sufficient. Other configuration register may also require tuning. This tuning happens when platform data is provided. The driver overrides sets whole configuration (the config register and even some more settings). Since on ARM we moved to DT-only this functionality is crippled for us but works for Intel. I put it on my todo list (fixing the sensor or entire configuration)... but if anyone would like to fix this, then go ahead. I can provide a tested-by. Best regards, Krzysztof