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] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKohponyeATPdmB7BZGShfaH0ETX8qfBLNM5jSkk6DpQ8vKfZw@mail.gmail.com>
Date:	Thu, 18 Oct 2012 13:37:51 +0530
From:	Viresh Kumar <viresh.kumar@...aro.org>
To:	Hongbo Zhang <hongbo.zhang@...aro.org>
Cc:	linaro-dev@...ts.linaro.org, linux-kernel@...r.kernel.org,
	linux-pm@...r.kernel.org, STEricsson_nomadik_linux@...t.st.com,
	kernel@...oocommunity.org, linaro-kernel@...ts.linaro.org,
	"hongbo.zhang" <hongbo.zhang@...aro.com>, patches@...aro.org
Subject: Re: [PATCH 5/5] Thermal: Add ST-Ericsson db8500 thermal dirver.

On 18 October 2012 13:05, Hongbo Zhang <hongbo.zhang@...aro.org> wrote:
> On 17 October 2012 23:23, Viresh Kumar <viresh.kumar@...aro.org> wrote:
>> On 16 October 2012 17:14, hongbo.zhang <hongbo.zhang@...aro.org> wrote:

>>> +static struct db8500_trip_point db8500_trips_table[] = {
>>> +       [0] = {
>>> +               .temp = 70000,
>>> +               .type = THERMAL_TRIP_ACTIVE,
>>> +               .cooling_dev_name = {
>>> +                       [0] = "thermal-cpufreq-0",
>>
>> If i am not wrong length of cooling_dev_name can't be greater than 8
> You are wrong this time, it is 20
> #define THERMAL_NAME_LENGTH 20

Ahh.. Its the array size fixed to 8.. not length of each element within.

>>>  static void __init mop500_init_machine(void)
>>> @@ -765,6 +834,10 @@ struct of_dev_auxdata u8500_auxdata_lookup[] __initdata = {
>>>                 "ux500-msp-i2s.2", &msp2_platform_data),
>>>         OF_DEV_AUXDATA("stericsson,ux500-msp-i2s", 0x80125000,
>>>                 "ux500-msp-i2s.3", &msp3_platform_data),
>>> +       OF_DEV_AUXDATA("stericsson,db8500-thermal", 0x801573c0,
>>> +                       "db8500-thermal", &db8500_thsens_data),
>>> +       OF_DEV_AUXDATA("stericsson,db8500-cpufreq-cooling", 0,
>>> +                       "db8500-cpufreq-cooling", NULL),
>>>         {},
>>>  };

>> Whatever the case, at-least we should pass data via DT for
>> u8500_auxdata_lookup[].
>> As you are adding the driver for the first time here, it must be able to parse
>> data via DT.
> Yes, for "db8500-thermal", data &db8500_thsens_data is parsed via DT
> but there is really no data for "db8500-cpufreq-cooling".

You didn't get my point. You are not parsing pdata via DT here, but setting
pdata of device node created due to DT.

What i am saying is, you must put in code in thermal driver, which will actually
parse data from DT and create a pdata structure at run time. And there you
would be required to add another file in Documentation with bindings for this
driver.

>>> +static int db8500_cpufreq_cooling_suspend(struct platform_device *pdev,
>>> +               pm_message_t state)
>>> +{
>>> +       return -ENOSYS;
>>> +}
>>> +
>>> +static int db8500_cpufreq_cooling_resume(struct platform_device *pdev)
>>> +{
>>> +       return -ENOSYS;
>>> +}
>>
>> Do you need these? Wouldn't it be same if you don't define them?
> There were not such functions before, I added them after reading
> Documentation/SubmittingDrivers.
> Is the document too old? should I follow it?

Probably the document is correct and i am not :)

--
viresh
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ