Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752726AbdGEMdQ (ORCPT ); Wed, 5 Jul 2017 08:33:16 -0400 Received: from mail-bn3nam01on0071.outbound.protection.outlook.com ([104.47.33.71]:36369 "EHLO NAM01-BN3-obe.outbound.protection.outlook.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1752018AbdGEMdM (ORCPT ); Wed, 5 Jul 2017 08:33:12 -0400 Authentication-Results: spf=fail (sender IP is 192.88.168.50) smtp.mailfrom=nxp.com; vger.kernel.org; dkim=none (message not signed) header.d=none;vger.kernel.org; dmarc=fail action=none header.from=nxp.com; Message-ID: <1499257985.23291.7.camel@nxp.com> Subject: Re: [PATCH] thermal: imx: interpret fsl,tempmon-data through nvmem From: Leonard Crestez To: Eduardo Valentin CC: Shawn Guo , Srinivas Kandagatla , Zhang Rui , "Rob Herring" , Mark Rutland , Lothar =?ISO-8859-1?Q?Wa=DFmann?= , Fabio Estevam , Bai Ping , Anson Huang , Dong Aisheng , "Octavian Purdila" , , , , Date: Wed, 5 Jul 2017 15:33:05 +0300 In-Reply-To: <20170704185400.GB18084@localhost.localdomain> References: <20170704185400.GB18084@localhost.localdomain> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-EOPAttributedMessage: 0 X-Matching-Connectors: 131437315900174421;(91ab9b29-cfa4-454e-5278-08d120cd25b8);() X-Forefront-Antispam-Report: CIP:192.88.168.50;IPV:NLI;CTRY:US;EFV:NLI;SFV:NSPM;SFS:(10009020)(6009001)(336005)(39840400002)(39850400002)(39860400002)(39450400003)(39410400002)(39400400002)(39380400002)(2980300002)(1110001)(1109001)(339900001)(24454002)(377424004)(189002)(199003)(9170700003)(8936002)(626005)(356003)(47776003)(81166006)(8676002)(2870700001)(33646002)(50226002)(106466001)(5660300001)(1411001)(4326008)(77096006)(7416002)(498600001)(229853002)(86362001)(85426001)(5820100001)(104016004)(53936002)(76176999)(110136004)(8656002)(305945005)(105606002)(50466002)(189998001)(50986999)(23676002)(38730400002)(2906002)(6916009)(36756003)(6246003)(54906002)(2950100002)(39060400002)(103116003)(99106002)(142933001);DIR:OUT;SFP:1101;SCL:1;SRVR:DM2PR0301MB0608;H:tx30smr01.am.freescale.net;FPR:;SPF:Fail;MLV:ovrnspm;MX:1;A:1;PTR:InfoDomainNonexistent;LANG:en; X-Microsoft-Exchange-Diagnostics: 1;BL2FFO11FD029;1:qgeZiFbe61ThZlszN/3/vjDSXH4XmtR28lKv7vFINERu04YfZWn82ngaLCsPrgGlGNYhC2cs0Ir2o9iT8VoAB5MHdU86xT01a/jVeLn1W9LLn/rYqMKEdSBXIImOn0HHewVG5i1xZkXHEyQ6ppxRUdAEqJcF6kgR8fW25q6ZDmKuhLLZpudrE2dCMWNS/gUPxGshCXED8woyEA32QIkP20PvuPVB1l9qV77Dt3H/BULlBpbLTAEViAX+nmWZlERxfavaWZ++Y+/z56rEPK8Upwy3ZBfYJ2JWqdvqOjfuNucEEnPk4TOadfH5XHq+ql/H/lYCzLz4wLp73Xf2yDsXT0oT0sXgGLrDMAU4Fk+lD4o0GdAMSr1tfJ86o1ZHmgdInv/SONuyIMVC3vD6WJf2v1lKG/+mTEakrRb9aMTciFsWk0jk+LGhVyvAEeAEaQhh7zWD/n6IYqGHBPbt8Q0dJyUTkB6IMVuWAwCYYUtY3YXx12UzFBLj5zu6yKXkly9cvVYrK0miXsxYJK6wbhUutjwfKthjXyF8xPgwtqEcsHYfy81ZztUTLvzZOoEClIK86oeQz5DvglJC7+0puzNIvf2yzQxlYeAhLaVns5RyvHy1HzpO9HhoJ7CgD8ucne1lN7txBoW3YYumgFG/SqNb57Vzb4QKZo/xZtcZ4a6WYC2EX3eOHyGUELuOEUtyW9j7X1JaCrPiPdKqX7JJ38nYyuju1WJDtkXEeBN44Y4XdeXxYkOZstCZHTHuBcBpHLqTDxBGsXCVUx0aLUyNiXoKkq3ezdPLBwpdsGOQMAQul9Fvkil6kmyzIcqlKcpnABXOxxIGk78WBtxs1IGfg27e0gMTFJSXz+La0XRLWqdEgyAnFU4Nx2Yk/FXwMHii40nDZ6HNzSnW0SBVJhJdR2ZmlK9Zbl6rDu48xH27taYIcwkeifkl9NCYgYPb3N4lgDye X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 5ca5b3c3-bb72-4079-e54d-08d4c3a1fed9 X-Microsoft-Antispam: UriScan:;BCL:0;PCL:0;RULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(300000503095)(300135400095)(2017052603031)(201703131430075)(201703131517081)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);SRVR:DM2PR0301MB0608; X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;3:rQLEP/q72/XrGMULRjNtlsqwgi8DmC3Oz7ecOhCzP2UozIFi4BzPgsblEUrA2l9alrXxG2h542LAyod+cfgx4qrQCB/GrU5tv+adgKdLJVLIZEvZy6jc7yzqg83vl5fr7hw80FfjS6OANzYaDVVtfBiDOrWjKza38lJol33Zs/YcCZp5xErC1zX7yyAiirYbTm35kbRKnsrr1S2KnHLwATMd6XNgZmWwmmMnCMY75U8aGR+jp+GpzOZIsWKJtbZNLvUuBsSFOGD9XADAJNc/b985InM/lEgsmpGPZa4fXIdnJUNBvcp1GeqmaVOcaxRc/xcOTiA6xHNzgJN7GYHHwQX1pXm5hIEHreAoGwp0KBGRm2rnSo3YcGlWvOvp2JmsFX1H31jRRpAWULdDV9fsyvwGKFfDfyl+OscL17EYvNjztZZ3TJw28O8qPfXk/Q928hydHMwyy3CUNKZ3pPxp/U6nUuvFWWPe4jULEVNUNiJZ31KxRzW65YfWz5dTuAXmsWPTZgZ1s02aHHXcNqGWQH2ocADkP+ko6UfQB9LbkvsnHlv0P1+n5sOnaiCnGDmbfILg83+ChnQHL5AHsIfUa42DufZISbQt5XROQXo7I4exSeGN0G5C6E6fruO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odCz9yvSMSAXX7l9v1mIXexoNGG2nYSism/2X96p36HIyp2uQwISyYg9lRwOuLQHqGOhUXIAsQnTIoVUlIUxm657XKYvGOdilFlEcZM/NknE6v5+mfOdXgaWk8oE5hWEfZcLhDJ7Xq2gb3Hr2i9bI2Hc9yZqp7X9UgirJHqGpy8iWYqm3aCGP2GakJNpbTI8= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;31:EY7hMCBoQuOviT23nzpX7q53ByetOOmrlEniGNtpr2SKePMML9/ItnX4EIcxP5rHbo2k8PiChlcAan0yAJzCmmTQxRVNLtq95D+UptzpVKQzs/3K7kkrfvnHXCl0aSskhEe06mus3+nS8QdlWOJiJjoRUjW5p3InLFfbr+Vgq+CwjVnd6BRYYgMCfZXjNqwhRJECXqv60Tfg79sp1P6nVJrOTl6oTvuMhmcKywnpqJZZua5z4a+7dJ0ZbEiIfwex7taogYX1ER0Zk2U0aJglf2RKzTwr0yLK5C1xjnYV1BD7RLSdiuUv9+TKNASIBtPED4+GWKsXR7H7MJm3kzsswkWQYlMCaEfb5RhZ4GxgWfA79WN6mNO7KCJK0VTfZAikkhmu19r0KV12i5YYiWddeys804pLdNklVD9aK25+1AOhDBcSJ8xLJlGkUXyErdXAHyr6bYZTo4lhX+tqzeLE4I3RpBa12vq2DB8y4cppOhE8rDl8+vwPX302bKFVfeETKqPRcqHOnxj1U8hQfWrzh9AKL+XrMRzMfSpGgpo6WbN9YZ6BDdudi4uT7JpvKVnBWkhZ6WbmOX95K8ry0QMOXBDvGzUMm6s7ih/087YTct6wkOMD7gOcOFC7qUIHYf5O2fp3LGqie+22Y1ja1L8m+ZgdX3bl0KmZ84rcP6uFVzQsTXL/S7xxG5NNBEtqaX1kKSP3Zz8X5RbzvedjMfc8qg== X-Microsoft-Antispam-PRVS: X-Exchange-Antispam-Report-Test: UriScan:(236129657087228)(17755550239193); X-Exchange-Antispam-Report-CFA-Test: BCL:0;PCL:0;RULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6095135)(601004)(2401047)(5005006)(8121501046)(13016025)(2017060910033)(13018025)(3002001)(100000703101)(100105400095)(10201501046)(93006095)(93001095)(6055026)(6096035)(20161123561025)(20161123565025)(201703131430075)(201703131433075)(201703131448075)(201703161259150)(201703151042153)(20161123563025)(20161123556025)(20161123559100)(100000704101)(100105200095)(100000705101)(100105500095);SRVR:DM2PR0301MB0608;BCL:0;PCL:0;RULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(400006)(100000804101)(100110200095)(100000805101)(100110500095);SRVR:DM2PR0301MB0608; X-Microsoft-Exchange-Diagnostics: =?utf-8?B?MTtETTJQUjAzMDFNQjA2MDg7NDo1aks5dFl5anRhek11azNHanJhZ2VIREtY?= =?utf-8?B?MC9hZ1RnUkNwTWNIMWwxVGRxckhVay9lNDRZS2ovU0FvNWNMT1laaFV1Y0ZH?= =?utf-8?B?RjZVK3pCVk1qeGR5Z3krOTdXRVBaMGdYRzhidHlNK3ZZRnJiSEpwTGxmZmt1?= =?utf-8?B?eWUweXJYSlFBQTVMOHFjdXZyVkQ0TDd2TitsY2VkNXJWZ29CWUZOTHdxbnNo?= =?utf-8?B?S00xdFhBL1NZRGNrQTVEMmcwSUx2VmFHMGxqOWpSOWpiNXBqSi9odTJPY1ds?= =?utf-8?B?VTQ5MWRKa1hhSmtBdGE2b2lnRXZ2UEtDL1ZvV0lqOTc1V3czc2lRN1N3MklD?= =?utf-8?B?b1JGbXdkMGlxNnBqSnV5MXp5WGxadjFWUVFKYmZnL2FMVW05c2M1Sk9LZE9Q?= =?utf-8?B?UWdZeEJQM1ZNcWZiakowZzhldG9jOUw1aW5zSncvbGM5dzRhMERVekR2SkRY?= =?utf-8?B?KytQZ1dIdlN6RnBCbmY4M3pkV2k2L3BpTDVHUFZMQkc2Z3doVjQwMlRuNTVJ?= =?utf-8?B?K1ZHZUdsNTVUYWt0d0VrSU1xVDU5NGYvQS9OTi9ZZmVMTE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XVnZUN0?= =?utf-8?B?YXE4TFIrRzlKbmpJTlhHT3ZuSnZacjNOOWVIWWt5NlBhK3hmYkNoakZ1ZHdp?= =?utf-8?B?N0UzRUhreldZbWEyZ3JmejZ6UnF2MDVtd3IvTGMrMDJvbVpnaEtxYzVJYjlR?= =?utf-8?Q?vE3Ul9hJtHP2qZtsm4gU8jUo9CZ/LTEFg=3D?= X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;5:JEjtU3XkK9j47m2uXfT/88kCFOAYYRlzb/1rrHIxg5rIOweZD4T32lvmN9324prjsS2vuuwoxGeatC6aaz4a7UR+lPuZp0+b1G8dBcHdzUOesRXLJs52Xzs36WevdQ80KQ1V3ByhYb+oYXkeAbV+z2eYz2YKK3NtvWx6vmOvR1s0MXt0c9YNkxafvqZH4DeoKLdyLXx7gzlQHohrZbWktZmdSAbmplzKX7TP763r/bSGZB5+l90ER6eQNDjarkkevNGqIu9wkxQGXo1+XhWx0/knEsf2xxoaK0wvYcbV+NamZn4vxBHPZdrIyYESHsV7hQfOusZEed/7yG/55IvwtpKliuxOYgs5SptWwccCMyBNzXeAVZuZHdx01hgq4YYGfy/H9zPHfnatzwUkfFtDIsvvl/1/kmpmmiUuuOpbUif7W4p1tBQze5OyHzBiZ3CqNosR8mfCDybS6hjPZBMg0v359Jw4zLcr++1mA0QnU+9b68TcqkJ8ljX2ZHjLYQzVxSKDLBLGmR4BU86QOPQ5dw==;24:Wn2YPLOEAyJEi5MJ45EBblcjEOFHq7DXsKttGKyqyndOdONUyzVB8bVklDo/e3KDqSqGrWP++2gJf49UOFhm9430ybof4NYvTMD6bAdrG+c= SpamDiagnosticOutput: 1:99 SpamDiagnosticMetadata: NSPM X-Microsoft-Exchange-Diagnostics: 1;DM2PR0301MB0608;7:udWHZxT6QfrboxrIbnOcSza4dERxB8L+WW9h4/RfLfrPWMYE9XYzk2gPiS5f1g5CSOP9zy+EuNGp3Cemm7LyfrDN6ZhF/0wfLNvHsE13VGBPRPLbN0wOJdxXZEqxylM4FA8wk6fSDfhwzS/qxlg9acx/XIWRHjB8sifwdhPyA5GDj8GNMoxKt9rGU4NnMI4V/iCWWSdnKPQfO1kQ6sypx1IIXUWEnmzjm2UdlFuLyz9g5VuALO2KHUo7eCZo7+Oal+6O9tGOAz7THITOTtdz7jmXbD73OXAooE6uF/sm3bINbc6f7HpbMhoOwDVl2XyDTFgik+27UEcKwwmpKoU+DNaORW20jV1i/SovCeIqM+1Aw6/XgFDobBsqYqIDbLwqqNEOj2PFqLS6o43Zu1IXIuR27D/DC0Fa2epLYaiEwoo7lCZcrzLyWYTNI96vUAeFShR+xNZjeiDMeoZoa23Z81HFlHjcGtZfZNqsO6hPh+Rygxm49BWNU4OXG9MeLkVsn8Nw7xK9QOv0A0+2v6nnewuuYBsBJe3qx7fzpTxL3j2Ha4n3FWJzkdLOjy2Rbg4Kdnq/v+n2NoZx6/p198S0s+sWTcMVkR9eWk0PByH+TOifof36nrsj1VBLwUWHcY8zE1hFZJ92RYlkjfci+IIgdg2PdQMIKLJbNPe5S20aq3/NLR5liEFGxrnVhtMd/ucwLInGigf8SvsvP4hQ1++0W/Ww8X2zbcnL4XVqPZzFAByDgyIOpPI5UONNdM4siDBvh5fR1diVyZw+zSbef9SiDcYEij5MbGl1xd2GF5ET9yc= X-MS-Exchange-CrossTenant-OriginalArrivalTime: 05 Jul 2017 12:33:09.6742 (UTC) X-MS-Exchange-CrossTenant-Id: 5afe0b00-7697-4969-b663-5eab37d5f47e X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=5afe0b00-7697-4969-b663-5eab37d5f47e;Ip=[192.88.168.50];Helo=[tx30smr01.am.freescale.net] X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM2PR0301MB0608 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2570 Lines: 67 On Tue, 2017-07-04 at 11:54 -0700, Eduardo Valentin wrote: > On Mon, Jun 19, 2017 at 04:40:43PM +0300, Leonard Crestez wrote: > > > > On imx6sx accessing the ocotp memory area directly is wrong because the > > ocotp clock needs to be enabled first. Fix this by reinterpreting the > > fsl,tempmon-data phandle as a reference to a nvmem_device and doing all > > the read through that. > > > > @@ -347,29 +348,39 @@ static struct thermal_zone_device_ops imx_tz_ops = { > >  static int imx_get_sensor_data(struct platform_device *pdev) > >  { > >   struct imx_thermal_data *data = platform_get_drvdata(pdev); > > - struct regmap *map; > > + struct device_node *ocotp_np; > > + struct nvmem_device *ocotp; > >   int t1, n1; > >   int ret; > >   u32 val; > >   u64 temp64; > >   > > - map = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, > > -       "fsl,tempmon-data"); > > - if (IS_ERR(map)) { > > - ret = PTR_ERR(map); > > - dev_err(&pdev->dev, "failed to get sensor regmap: %d\n", ret); > > + ocotp_np = of_parse_phandle(pdev->dev.of_node, "fsl,tempmon-data", 0); > > + if (IS_ERR(ocotp_np)) { > > + ret = PTR_ERR(ocotp_np); > > + dev_err(&pdev->dev, "failed to parse fsl,tempmon-data phandle: %d\n", ret); > > + return ret; > > + } > > + ocotp = of_nvmem_device_phandle_get(ocotp_np); > > + of_node_put(ocotp_np); > > + if (IS_ERR(ocotp)) { > > + ret = PTR_ERR(ocotp); > > + if (ret != -EPROBE_DEFER) > > + dev_err(&pdev->dev, "failed to get fsl,tempmon-data nvmem device: %d\n", ret); > >   return ret; > >   } > >   > > @@ -404,10 +415,11 @@ static int imx_get_sensor_data(struct platform_device *pdev) > >   data->c2 = n1 * data->c1 + 1000 * t1; > >   > >   /* use OTP for thermal grade */ > > - ret = regmap_read(map, OCOTP_MEM0, &val); > > - if (ret) { > > - dev_err(&pdev->dev, "failed to read temp grade: %d\n", ret); > > - return ret; > I see a few other occurences of regmap_read() in this driver, for > example, inside imx_get_temp(). Do they also get affect by the reported > bug? Should they be replaced with nvmem_device_read() too? No, most of the code uses regmap to read from the tempmon device itself. It is only imx_get_sensor_data which uses syscon_regmap_lookup to fetch the regmap for another device (ocotp) in order to read calibration data and thermal grading at probe time. Perhaps this function should be renamed to something like imx_tempmon_init_calib. The problem is that on newer imx SOCs reading directly from OCOTP like that doesn't work if the ocotp clock is not enabled. -- Regards, Leonard