lkml.org 
[lkml]   [2013]   [Oct]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH v4 1/4] backlight: introduce backlight_device_registered
Date
On Thu, 10 Oct 2013, Aaron Lu <aaron.lu@intel.com> wrote:
> On 10/10/2013 12:29 PM, Jani Nikula wrote:
>> On Thu, 10 Oct 2013, Aaron Lu <aaron.lu@intel.com> wrote:
>>> On 10/10/2013 08:25 AM, Rafael J. Wysocki wrote:
>>>> On Tuesday, October 08, 2013 02:39:58 PM Aaron Lu wrote:
>>>>> +bool backlight_device_registered(enum backlight_type type)
>>>>> +{
>>>>> + bool found = false;
>>>>> + struct backlight_device *bd;
>>>>> +
>>>>> + mutex_lock(&bd_list_mutex);
>>>>> + list_for_each_entry(bd, &bd_list_head, entry) {
>>>>> + if (bd->props.type == type) {
>>>>> + found = true;
>>>>> + break;
>>>>> + }
>>>>> + }
>>>>
>>>> Isn't it useful to be able to register more than one backlight device of the
>>>> same type sometimes?
>>>
>>> I think so for some kind of computers. OTOH, the above function should
>>> be enough for the problem we are solving here, if someday we need to
>>> differentiate, we can enhance the code then.
>>
>> Since both Baytrail and Haswell already have two backlight PWMs, this
>> may be needed sooner than you think. But we shouldn't let that block
>
> Do we need to differentiate which backlight PWM is registered to decide
> if ACPI video backlight interface should be skipped? My understanding is
> no.

That's correct. If things change, we can fix it then.

Jani.


>
> Thanks,
> Aaron
>
>> fixing the more urgent issue we have now. So I'm fine with this. It
>> doesn't prevent one from registering more than one device of the same
>> type anyway.
>>
>> BR,
>> Jani.
>>
>>
>>
>

--
Jani Nikula, Intel Open Source Technology Center


\
 
 \ /
  Last update: 2013-10-10 07:41    [W:0.036 / U:0.292 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site