lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <96db4471-0dfe-4969-a916-405105a663ae@quicinc.com>
Date: Wed, 18 Dec 2024 16:52:19 +0530
From: Manikanta Mylavarapu <quic_mmanikan@...cinc.com>
To: Christophe JAILLET <christophe.jaillet@...adoo.fr>
CC: <quic_srichara@...cinc.com>, <quic_varada@...cinc.com>,
        <srinivas.kandagatla@...aro.org>, <robh@...nel.org>,
        <krzk+dt@...nel.org>, <conor+dt@...nel.org>, <amitk@...nel.org>,
        <thara.gopinath@...il.com>, <rafael@...nel.org>,
        <daniel.lezcano@...aro.org>, <rui.zhang@...el.com>,
        <lukasz.luba@....com>, <andersson@...nel.org>,
        <konradybcio@...nel.org>, <linux-arm-msm@...r.kernel.org>,
        <devicetree@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
        <linux-pm@...r.kernel.org>
Subject: Re: [PATCH v9 3/7] thermal/drivers/tsens: Add TSENS enable and
 calibration support for V2



On 12/14/2024 12:32 AM, Christophe JAILLET wrote:
> Le 25/11/2024 à 06:07, Manikanta Mylavarapu a écrit :
>> From: Praveenkumar I <quic_ipkumar-jfJNa2p1gH1BDgjK7y7TUQ@...lic.gmane.org>
>>
>> SoCs without RPM need to enable sensors and calibrate them from the kernel.
>> The IPQ5332 and IPQ5424 use the tsens v2.3.3 IP and do not have RPM.
>> Therefore, add a new calibration function for V2, as the tsens.c calib
>> function only supports V1. Also add new feature_config, ops and data for
>> IPQ5332, IPQ5424.
>>
>> Although the TSENS IP supports 16 sensors, not all are used. The hw_id
>> is used to enable the relevant sensors.
> 
> ...
> 
>> diff --git a/drivers/thermal/qcom/tsens-v2.c b/drivers/thermal/qcom/tsens-v2.c
>> index 0cb7301eca6e..836155fa9ab2 100644
>> --- a/drivers/thermal/qcom/tsens-v2.c
>> +++ b/drivers/thermal/qcom/tsens-v2.c
>> @@ -4,13 +4,32 @@
>>    * Copyright (c) 2018, Linaro Limited
>>    */
>>   +#include <linux/bitfield.h>
>>   #include <linux/bitops.h>
>>   #include <linux/regmap.h>
>> +#include <linux/nvmem-consumer.h>
> 
> If moved one line above, alphabetical order would be kept.
> 

Sure, i will update in the next version.

>>   #include "tsens.h"
>>     /* ----- SROT ------ */
>>   #define SROT_HW_VER_OFF    0x0000
> 
> ...
> 
>> +static const struct tsens_ops ops_ipq5332 = {
>> +    .init        = init_tsens_v2_no_rpm,
>> +    .get_temp    = get_temp_tsens_valid,
>> +    .calibrate    = tsens_v2_calibration,
>> +};
>> +
>> +struct tsens_plat_data data_ipq5332 = {
> 
> This could easily be made as const.
> 

Sure, i will update in the next version.

>> +    .num_sensors    = 5,
>> +    .ops        = &ops_ipq5332,
>> +    .hw_ids        = (unsigned int []){11, 12, 13, 14, 15},
>> +    .feat        = &ipq5332_feat,
>> +    .fields        = tsens_v2_regfields,
>> +};
>> +
>> +struct tsens_plat_data data_ipq5424 = {
> 
> This could easily be made as const.
> 

Sure, i will update in the next version.

Thanks & Regards,
Manikanta.

>> +    .num_sensors    = 7,
>> +    .ops        = &ops_ipq5332,
>> +    .hw_ids        = (unsigned int []){9, 10, 11, 12, 13, 14, 15},
>> +    .feat        = &ipq5332_feat,
>> +    .fields        = tsens_v2_regfields,
>> +};
> 
> ...
> 
> CJ


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ