Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-10 Thread Mark Brown
On Thu, Oct 10, 2013 at 08:40:38PM +0900, Inki Dae wrote:

> That is what I mentioned. Some boards _could control_ the actual regulator
> for lvds-bridge, and that would be depended on how HW engineer designs the
> board. 

For the driver this should be totally transparent - it should just
control the regulator all the time, the regulator API will just not do
anything if the regulator state can't actually be changed.


signature.asc
Description: Digital signature


RE: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-10 Thread Inki Dae


> -Original Message-
> From: Mark Brown [mailto:broo...@kernel.org]
> Sent: Thursday, October 10, 2013 6:37 PM
> To: Inki Dae
> Cc: 'Olof Johansson'; 'Sean Paul'; devicet...@vger.kernel.org; linux-
> samsung-...@vger.kernel.org; linux-...@vger.kernel.org; linux-
> ker...@vger.kernel.org; 'DRI mailing list'; linux-arm-
> ker...@lists.infradead.org
> Subject: Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver
> 
> On Thu, Oct 10, 2013 at 01:18:05PM +0900, Inki Dae wrote:
> 
> > > > I still think the pin could be replaced with a regulator. But
> > > > lvds-bridge node has "powerdown-gpio" property - it say this board
> > > > will use gpio pin - specific to board.  So it seems no problem.
> 
> > > No, don't model things that aren't regulators as regulators - it's
> > > just confusing from a usability standpoint and causes breakage when
> > > the pins don't behave like regulators.
> 
> > It seems that there was your missing point. That _is not_ what I
> mentioned.
> > I mean that other boards can use a regulator instead of gpio pin.
> 
> What I'm saying is no boards should use a regulator to control that GPIO
> pin, obviously if they're controlling the actual regulators that's fine

That is what I mentioned. Some boards _could control_ the actual regulator
for lvds-bridge, and that would be depended on how HW engineer designs the
board. 

> but the reset signal should not be controlled via the regulator API (there
> are some unfortunate cases where people have done that already but let's
> not have any more).

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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-10 Thread Mark Brown
On Thu, Oct 10, 2013 at 01:18:05PM +0900, Inki Dae wrote:

> > > I still think the pin could be replaced with a regulator. But
> > > lvds-bridge node has "powerdown-gpio" property - it say this board
> > > will use gpio pin - specific to board.  So it seems no problem.

> > No, don't model things that aren't regulators as regulators - it's just
> > confusing from a usability standpoint and causes breakage when the pins
> > don't behave like regulators.

> It seems that there was your missing point. That _is not_ what I mentioned.
> I mean that other boards can use a regulator instead of gpio pin.

What I'm saying is no boards should use a regulator to control that
GPIO pin, obviously if they're controlling the actual regulators that's
fine but the reset signal should not be controlled via the regulator
API (there are some unfortunate cases where people have done that
already but let's not have any more).


signature.asc
Description: Digital signature


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-10 Thread Mark Brown
On Thu, Oct 10, 2013 at 01:18:05PM +0900, Inki Dae wrote:

   I still think the pin could be replaced with a regulator. But
   lvds-bridge node has powerdown-gpio property - it say this board
   will use gpio pin - specific to board.  So it seems no problem.

  No, don't model things that aren't regulators as regulators - it's just
  confusing from a usability standpoint and causes breakage when the pins
  don't behave like regulators.

 It seems that there was your missing point. That _is not_ what I mentioned.
 I mean that other boards can use a regulator instead of gpio pin.

What I'm saying is no boards should use a regulator to control that
GPIO pin, obviously if they're controlling the actual regulators that's
fine but the reset signal should not be controlled via the regulator
API (there are some unfortunate cases where people have done that
already but let's not have any more).


signature.asc
Description: Digital signature


RE: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-10 Thread Inki Dae


 -Original Message-
 From: Mark Brown [mailto:broo...@kernel.org]
 Sent: Thursday, October 10, 2013 6:37 PM
 To: Inki Dae
 Cc: 'Olof Johansson'; 'Sean Paul'; devicet...@vger.kernel.org; linux-
 samsung-...@vger.kernel.org; linux-...@vger.kernel.org; linux-
 ker...@vger.kernel.org; 'DRI mailing list'; linux-arm-
 ker...@lists.infradead.org
 Subject: Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver
 
 On Thu, Oct 10, 2013 at 01:18:05PM +0900, Inki Dae wrote:
 
I still think the pin could be replaced with a regulator. But
lvds-bridge node has powerdown-gpio property - it say this board
will use gpio pin - specific to board.  So it seems no problem.
 
   No, don't model things that aren't regulators as regulators - it's
   just confusing from a usability standpoint and causes breakage when
   the pins don't behave like regulators.
 
  It seems that there was your missing point. That _is not_ what I
 mentioned.
  I mean that other boards can use a regulator instead of gpio pin.
 
 What I'm saying is no boards should use a regulator to control that GPIO
 pin, obviously if they're controlling the actual regulators that's fine

That is what I mentioned. Some boards _could control_ the actual regulator
for lvds-bridge, and that would be depended on how HW engineer designs the
board. 

 but the reset signal should not be controlled via the regulator API (there
 are some unfortunate cases where people have done that already but let's
 not have any more).

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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-10 Thread Mark Brown
On Thu, Oct 10, 2013 at 08:40:38PM +0900, Inki Dae wrote:

 That is what I mentioned. Some boards _could control_ the actual regulator
 for lvds-bridge, and that would be depended on how HW engineer designs the
 board. 

For the driver this should be totally transparent - it should just
control the regulator all the time, the regulator API will just not do
anything if the regulator state can't actually be changed.


signature.asc
Description: Digital signature


RE: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-09 Thread Inki Dae


> -Original Message-
> From: Mark Brown [mailto:broo...@kernel.org]
> Sent: Thursday, October 10, 2013 3:29 AM
> To: Inki Dae
> Cc: Olof Johansson; Sean Paul; devicet...@vger.kernel.org; linux-samsung-
> s...@vger.kernel.org; linux-...@vger.kernel.org; linux-
> ker...@vger.kernel.org; DRI mailing list; linux-arm-
> ker...@lists.infradead.org
> Subject: Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver
> 
> On Fri, Oct 04, 2013 at 11:05:48AM +0900, Inki Dae wrote:
> > 2013/10/4 Olof Johansson :
> 
> > > "If PD_N is LOW, then the device is in Deep power-down completely,
> > > even if supply rail is ON; for the device to be able to operate, the
> > > PD_N pin must be HIGH."
> 
> > I still think the pin could be replaced with a regulator. But
> > lvds-bridge node has "powerdown-gpio" property - it say this board
> > will use gpio pin - specific to board.  So it seems no problem.
> 
> No, don't model things that aren't regulators as regulators - it's just
> confusing from a usability standpoint and causes breakage when the pins
> don't behave like regulators.

It seems that there was your missing point. That _is not_ what I mentioned.
I mean that other boards can use a regulator instead of gpio pin.




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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-09 Thread Mark Brown
On Fri, Oct 04, 2013 at 11:05:48AM +0900, Inki Dae wrote:
> 2013/10/4 Olof Johansson :

> > "If PD_N is LOW, then the device is in Deep power-down completely,
> > even if supply rail is ON; for the device to be able to operate, the
> > PD_N pin must be HIGH."

> I still think the pin could be replaced with a regulator. But
> lvds-bridge node has "powerdown-gpio" property - it say this board
> will use gpio pin - specific to board.  So it seems no problem.

No, don't model things that aren't regulators as regulators - it's just
confusing from a usability standpoint and causes breakage when the pins
don't behave like regulators.


signature.asc
Description: Digital signature


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-09 Thread Mark Brown
On Fri, Oct 04, 2013 at 11:05:48AM +0900, Inki Dae wrote:
 2013/10/4 Olof Johansson o...@lixom.net:

  If PD_N is LOW, then the device is in Deep power-down completely,
  even if supply rail is ON; for the device to be able to operate, the
  PD_N pin must be HIGH.

 I still think the pin could be replaced with a regulator. But
 lvds-bridge node has powerdown-gpio property - it say this board
 will use gpio pin - specific to board.  So it seems no problem.

No, don't model things that aren't regulators as regulators - it's just
confusing from a usability standpoint and causes breakage when the pins
don't behave like regulators.


signature.asc
Description: Digital signature


RE: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-09 Thread Inki Dae


 -Original Message-
 From: Mark Brown [mailto:broo...@kernel.org]
 Sent: Thursday, October 10, 2013 3:29 AM
 To: Inki Dae
 Cc: Olof Johansson; Sean Paul; devicet...@vger.kernel.org; linux-samsung-
 s...@vger.kernel.org; linux-...@vger.kernel.org; linux-
 ker...@vger.kernel.org; DRI mailing list; linux-arm-
 ker...@lists.infradead.org
 Subject: Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver
 
 On Fri, Oct 04, 2013 at 11:05:48AM +0900, Inki Dae wrote:
  2013/10/4 Olof Johansson o...@lixom.net:
 
   If PD_N is LOW, then the device is in Deep power-down completely,
   even if supply rail is ON; for the device to be able to operate, the
   PD_N pin must be HIGH.
 
  I still think the pin could be replaced with a regulator. But
  lvds-bridge node has powerdown-gpio property - it say this board
  will use gpio pin - specific to board.  So it seems no problem.
 
 No, don't model things that aren't regulators as regulators - it's just
 confusing from a usability standpoint and causes breakage when the pins
 don't behave like regulators.

It seems that there was your missing point. That _is not_ what I mentioned.
I mean that other boards can use a regulator instead of gpio pin.




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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/4 Olof Johansson :
> On Thu, Oct 3, 2013 at 10:39 AM, Inki Dae  wrote:
>> 2013/10/3 Sean Paul :
>>> On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
 Can a regulator be used instead of gpio in other board case?

>>>
>>> No, not to my knowledge.
>>>
>>
>> Hm.. plz check it out again. the gpio pin is specific to board, and
>> the the gpio be used as power source trigger could be replaced with a
>> regulator according to board design. So you should consider all
>> possibilities even though there are no other cases yet: other board
>> could  use a regulator instead.
>
> Take a look at the data sheet, it is publicly available.
>
> PD_N is not a power supply input, so modelling it as a regulator makes no 
> sense:
>
> "If PD_N is LOW, then the device is in Deep power-down completely,
> even if supply rail is ON; for the device to be able to operate, the
> PD_N pin must be HIGH."
>

I still think the pin could be replaced with a regulator. But
lvds-bridge node has "powerdown-gpio" property - it say this board
will use gpio pin - specific to board.  So it seems no problem.

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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/4 Sean Paul :
> On Thu, Oct 3, 2013 at 2:23 PM, Inki Dae  wrote:
>> 2013/10/4 Sean Paul :
>>> On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae  wrote:
 2013/10/3 Sean Paul :
> On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
>> Hi, thank you for your contribution and the below is my short comments,
>>
>> 2013/10/2 Sean Paul :
>>> This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
>>> bridge chip.
>>>
>>> Signed-off-by: Sean Paul 
>>> ---
>>>  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
>>>  drivers/gpu/drm/Kconfig|   2 +
>>>  drivers/gpu/drm/Makefile   |   1 +
>>>  drivers/gpu/drm/bridge/Kconfig |   4 +
>>>  drivers/gpu/drm/bridge/Makefile|   3 +
>>>  drivers/gpu/drm/bridge/ptn3460.c   | 349 
>>> +
>>>  include/drm/bridge/ptn3460.h   |  36 +++
>>>  7 files changed, 422 insertions(+)
>>>  create mode 100644 
>>> Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>>  create mode 100644 drivers/gpu/drm/bridge/Kconfig
>>>  create mode 100644 drivers/gpu/drm/bridge/Makefile
>>>  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
>>>  create mode 100644 include/drm/bridge/ptn3460.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
>>> b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>> new file mode 100644
>>> index 000..c1cd329
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>> @@ -0,0 +1,27 @@
>>> +ptn3460-bridge bindings
>>> +
>>> +Required properties:
>>> +   - compatible: "nxp,ptn3460"
>>> +   - reg: i2c address of the bridge
>>> +   - powerdown-gpio: OF device-tree gpio specification
>>
>> Can a regulator be used instead of gpio in other board case?
>>
>
> No, not to my knowledge.
>

 Hm.. plz check it out again. the gpio pin is specific to board, and
 the the gpio be used as power source trigger could be replaced with a
 regulator according to board design. So you should consider all
 possibilities even though there are no other cases yet: other board
 could  use a regulator instead.

>
>>> +   - reset-gpio: OF device-tree gpio specification
>>> +   - edid-emulation: The EDID emulation entry to use
>>> +   +---++--+
>>> +   | Value | Resolution | Description  |
>>> +   |   0   |  1024x768  | NXP Generic  |
>>> +   |   1   |  1920x1080 | NXP Generic  |
>>> +   |   2   |  1920x1080 | NXP Generic  |
>>> +   |   3   |  1600x900  | Samsung LTM200KT |
>>> +   |   4   |  1920x1080 | Samsung LTM230HT |
>>> +   |   5   |  1366x768  | NXP Generic  |
>>> +   |   6   |  1600x900  | ChiMei M215HGE   |
>>> +   +---++--+
>>> +
>>> +Example:
>>> +   ptn3460-bridge@20 {
>>> +   compatible = "nxp,ptn3460";
>>> +   reg = <0x20>;
>>> +   powerdown-gpio = < 5 1 0 0>;
>>> +   reset-gpio = < 5 1 0 0>;
>>> +   edid-emulation = <5>;
>>> +   };
>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>>> index 95d..cd7bfb3 100644
>>> --- a/drivers/gpu/drm/Kconfig
>>> +++ b/drivers/gpu/drm/Kconfig
>>> @@ -236,3 +236,5 @@ source "drivers/gpu/drm/tilcdc/Kconfig"
>>>  source "drivers/gpu/drm/qxl/Kconfig"
>>>
>>>  source "drivers/gpu/drm/msm/Kconfig"
>>> +
>>> +source "drivers/gpu/drm/bridge/Kconfig"
>>> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
>>> index f089adf..9234253 100644
>>> --- a/drivers/gpu/drm/Makefile
>>> +++ b/drivers/gpu/drm/Makefile
>>> @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
>>>  obj-$(CONFIG_DRM_QXL) += qxl/
>>>  obj-$(CONFIG_DRM_MSM) += msm/
>>>  obj-y  += i2c/
>>> +obj-y  += bridge/
>>> diff --git a/drivers/gpu/drm/bridge/Kconfig 
>>> b/drivers/gpu/drm/bridge/Kconfig
>>> new file mode 100644
>>> index 000..f8db069
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/bridge/Kconfig
>>> @@ -0,0 +1,4 @@
>>> +config DRM_PTN3460
>>> +   tristate "PTN3460 DP/LVDS bridge"
>>> +   depends on DRM && I2C
>>> +   ---help---
>>> diff --git a/drivers/gpu/drm/bridge/Makefile 
>>> b/drivers/gpu/drm/bridge/Makefile
>>> new file mode 100644
>>> index 000..b4733e1
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/bridge/Makefile
>>> @@ -0,0 +1,3 @@

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Sean Paul
On Thu, Oct 3, 2013 at 2:23 PM, Inki Dae  wrote:
> 2013/10/4 Sean Paul :
>> On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae  wrote:
>>> 2013/10/3 Sean Paul :
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
> Hi, thank you for your contribution and the below is my short comments,
>
> 2013/10/2 Sean Paul :
>> This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
>> bridge chip.
>>
>> Signed-off-by: Sean Paul 
>> ---
>>  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
>>  drivers/gpu/drm/Kconfig|   2 +
>>  drivers/gpu/drm/Makefile   |   1 +
>>  drivers/gpu/drm/bridge/Kconfig |   4 +
>>  drivers/gpu/drm/bridge/Makefile|   3 +
>>  drivers/gpu/drm/bridge/ptn3460.c   | 349 
>> +
>>  include/drm/bridge/ptn3460.h   |  36 +++
>>  7 files changed, 422 insertions(+)
>>  create mode 100644 
>> Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>  create mode 100644 drivers/gpu/drm/bridge/Kconfig
>>  create mode 100644 drivers/gpu/drm/bridge/Makefile
>>  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
>>  create mode 100644 include/drm/bridge/ptn3460.h
>>
>> diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
>> b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>> new file mode 100644
>> index 000..c1cd329
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>> @@ -0,0 +1,27 @@
>> +ptn3460-bridge bindings
>> +
>> +Required properties:
>> +   - compatible: "nxp,ptn3460"
>> +   - reg: i2c address of the bridge
>> +   - powerdown-gpio: OF device-tree gpio specification
>
> Can a regulator be used instead of gpio in other board case?
>

 No, not to my knowledge.

>>>
>>> Hm.. plz check it out again. the gpio pin is specific to board, and
>>> the the gpio be used as power source trigger could be replaced with a
>>> regulator according to board design. So you should consider all
>>> possibilities even though there are no other cases yet: other board
>>> could  use a regulator instead.
>>>

>> +   - reset-gpio: OF device-tree gpio specification
>> +   - edid-emulation: The EDID emulation entry to use
>> +   +---++--+
>> +   | Value | Resolution | Description  |
>> +   |   0   |  1024x768  | NXP Generic  |
>> +   |   1   |  1920x1080 | NXP Generic  |
>> +   |   2   |  1920x1080 | NXP Generic  |
>> +   |   3   |  1600x900  | Samsung LTM200KT |
>> +   |   4   |  1920x1080 | Samsung LTM230HT |
>> +   |   5   |  1366x768  | NXP Generic  |
>> +   |   6   |  1600x900  | ChiMei M215HGE   |
>> +   +---++--+
>> +
>> +Example:
>> +   ptn3460-bridge@20 {
>> +   compatible = "nxp,ptn3460";
>> +   reg = <0x20>;
>> +   powerdown-gpio = < 5 1 0 0>;
>> +   reset-gpio = < 5 1 0 0>;
>> +   edid-emulation = <5>;
>> +   };
>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>> index 95d..cd7bfb3 100644
>> --- a/drivers/gpu/drm/Kconfig
>> +++ b/drivers/gpu/drm/Kconfig
>> @@ -236,3 +236,5 @@ source "drivers/gpu/drm/tilcdc/Kconfig"
>>  source "drivers/gpu/drm/qxl/Kconfig"
>>
>>  source "drivers/gpu/drm/msm/Kconfig"
>> +
>> +source "drivers/gpu/drm/bridge/Kconfig"
>> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
>> index f089adf..9234253 100644
>> --- a/drivers/gpu/drm/Makefile
>> +++ b/drivers/gpu/drm/Makefile
>> @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
>>  obj-$(CONFIG_DRM_QXL) += qxl/
>>  obj-$(CONFIG_DRM_MSM) += msm/
>>  obj-y  += i2c/
>> +obj-y  += bridge/
>> diff --git a/drivers/gpu/drm/bridge/Kconfig 
>> b/drivers/gpu/drm/bridge/Kconfig
>> new file mode 100644
>> index 000..f8db069
>> --- /dev/null
>> +++ b/drivers/gpu/drm/bridge/Kconfig
>> @@ -0,0 +1,4 @@
>> +config DRM_PTN3460
>> +   tristate "PTN3460 DP/LVDS bridge"
>> +   depends on DRM && I2C
>> +   ---help---
>> diff --git a/drivers/gpu/drm/bridge/Makefile 
>> b/drivers/gpu/drm/bridge/Makefile
>> new file mode 100644
>> index 000..b4733e1
>> --- /dev/null
>> +++ b/drivers/gpu/drm/bridge/Makefile
>> @@ -0,0 +1,3 @@
>> +ccflags-y := -Iinclude/drm
>> +
>> +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
>> diff --git 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/4 Sean Paul :
> On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae  wrote:
>> 2013/10/3 Sean Paul :
>>> On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
 Hi, thank you for your contribution and the below is my short comments,

 2013/10/2 Sean Paul :
> This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
> bridge chip.
>
> Signed-off-by: Sean Paul 
> ---
>  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
>  drivers/gpu/drm/Kconfig|   2 +
>  drivers/gpu/drm/Makefile   |   1 +
>  drivers/gpu/drm/bridge/Kconfig |   4 +
>  drivers/gpu/drm/bridge/Makefile|   3 +
>  drivers/gpu/drm/bridge/ptn3460.c   | 349 
> +
>  include/drm/bridge/ptn3460.h   |  36 +++
>  7 files changed, 422 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>  create mode 100644 drivers/gpu/drm/bridge/Kconfig
>  create mode 100644 drivers/gpu/drm/bridge/Makefile
>  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
>  create mode 100644 include/drm/bridge/ptn3460.h
>
> diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
> b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
> new file mode 100644
> index 000..c1cd329
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
> @@ -0,0 +1,27 @@
> +ptn3460-bridge bindings
> +
> +Required properties:
> +   - compatible: "nxp,ptn3460"
> +   - reg: i2c address of the bridge
> +   - powerdown-gpio: OF device-tree gpio specification

 Can a regulator be used instead of gpio in other board case?

>>>
>>> No, not to my knowledge.
>>>
>>
>> Hm.. plz check it out again. the gpio pin is specific to board, and
>> the the gpio be used as power source trigger could be replaced with a
>> regulator according to board design. So you should consider all
>> possibilities even though there are no other cases yet: other board
>> could  use a regulator instead.
>>
>>>
> +   - reset-gpio: OF device-tree gpio specification
> +   - edid-emulation: The EDID emulation entry to use
> +   +---++--+
> +   | Value | Resolution | Description  |
> +   |   0   |  1024x768  | NXP Generic  |
> +   |   1   |  1920x1080 | NXP Generic  |
> +   |   2   |  1920x1080 | NXP Generic  |
> +   |   3   |  1600x900  | Samsung LTM200KT |
> +   |   4   |  1920x1080 | Samsung LTM230HT |
> +   |   5   |  1366x768  | NXP Generic  |
> +   |   6   |  1600x900  | ChiMei M215HGE   |
> +   +---++--+
> +
> +Example:
> +   ptn3460-bridge@20 {
> +   compatible = "nxp,ptn3460";
> +   reg = <0x20>;
> +   powerdown-gpio = < 5 1 0 0>;
> +   reset-gpio = < 5 1 0 0>;
> +   edid-emulation = <5>;
> +   };
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 95d..cd7bfb3 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -236,3 +236,5 @@ source "drivers/gpu/drm/tilcdc/Kconfig"
>  source "drivers/gpu/drm/qxl/Kconfig"
>
>  source "drivers/gpu/drm/msm/Kconfig"
> +
> +source "drivers/gpu/drm/bridge/Kconfig"
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index f089adf..9234253 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
>  obj-$(CONFIG_DRM_QXL) += qxl/
>  obj-$(CONFIG_DRM_MSM) += msm/
>  obj-y  += i2c/
> +obj-y  += bridge/
> diff --git a/drivers/gpu/drm/bridge/Kconfig 
> b/drivers/gpu/drm/bridge/Kconfig
> new file mode 100644
> index 000..f8db069
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/Kconfig
> @@ -0,0 +1,4 @@
> +config DRM_PTN3460
> +   tristate "PTN3460 DP/LVDS bridge"
> +   depends on DRM && I2C
> +   ---help---
> diff --git a/drivers/gpu/drm/bridge/Makefile 
> b/drivers/gpu/drm/bridge/Makefile
> new file mode 100644
> index 000..b4733e1
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/Makefile
> @@ -0,0 +1,3 @@
> +ccflags-y := -Iinclude/drm
> +
> +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
> diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
> b/drivers/gpu/drm/bridge/ptn3460.c
> new file mode 100644
> index 000..a9e5c1a
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/ptn3460.c

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Sean Paul
On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae  wrote:
> 2013/10/3 Sean Paul :
>> On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
>>> Hi, thank you for your contribution and the below is my short comments,
>>>
>>> 2013/10/2 Sean Paul :
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul 
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 
 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: "nxp,ptn3460"
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification
>>>
>>> Can a regulator be used instead of gpio in other board case?
>>>
>>
>> No, not to my knowledge.
>>
>
> Hm.. plz check it out again. the gpio pin is specific to board, and
> the the gpio be used as power source trigger could be replaced with a
> regulator according to board design. So you should consider all
> possibilities even though there are no other cases yet: other board
> could  use a regulator instead.
>
>>
 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = "nxp,ptn3460";
 +   reg = <0x20>;
 +   powerdown-gpio = < 5 1 0 0>;
 +   reset-gpio = < 5 1 0 0>;
 +   edid-emulation = <5>;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source "drivers/gpu/drm/tilcdc/Kconfig"
  source "drivers/gpu/drm/qxl/Kconfig"

  source "drivers/gpu/drm/msm/Kconfig"
 +
 +source "drivers/gpu/drm/bridge/Kconfig"
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig 
 b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate "PTN3460 DP/LVDS bridge"
 +   depends on DRM && I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile 
 b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Olof Johansson
On Thu, Oct 3, 2013 at 10:39 AM, Inki Dae  wrote:
> 2013/10/3 Sean Paul :
>> On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
>>> Can a regulator be used instead of gpio in other board case?
>>>
>>
>> No, not to my knowledge.
>>
>
> Hm.. plz check it out again. the gpio pin is specific to board, and
> the the gpio be used as power source trigger could be replaced with a
> regulator according to board design. So you should consider all
> possibilities even though there are no other cases yet: other board
> could  use a regulator instead.

Take a look at the data sheet, it is publicly available.

PD_N is not a power supply input, so modelling it as a regulator makes no sense:

"If PD_N is LOW, then the device is in Deep power-down completely,
even if supply rail is ON; for the device to be able to operate, the
PD_N pin must be HIGH."



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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/3 Sean Paul :
> On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
>> Hi, thank you for your contribution and the below is my short comments,
>>
>> 2013/10/2 Sean Paul :
>>> This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
>>> bridge chip.
>>>
>>> Signed-off-by: Sean Paul 
>>> ---
>>>  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
>>>  drivers/gpu/drm/Kconfig|   2 +
>>>  drivers/gpu/drm/Makefile   |   1 +
>>>  drivers/gpu/drm/bridge/Kconfig |   4 +
>>>  drivers/gpu/drm/bridge/Makefile|   3 +
>>>  drivers/gpu/drm/bridge/ptn3460.c   | 349 
>>> +
>>>  include/drm/bridge/ptn3460.h   |  36 +++
>>>  7 files changed, 422 insertions(+)
>>>  create mode 100644 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>>  create mode 100644 drivers/gpu/drm/bridge/Kconfig
>>>  create mode 100644 drivers/gpu/drm/bridge/Makefile
>>>  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
>>>  create mode 100644 include/drm/bridge/ptn3460.h
>>>
>>> diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
>>> b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>> new file mode 100644
>>> index 000..c1cd329
>>> --- /dev/null
>>> +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>> @@ -0,0 +1,27 @@
>>> +ptn3460-bridge bindings
>>> +
>>> +Required properties:
>>> +   - compatible: "nxp,ptn3460"
>>> +   - reg: i2c address of the bridge
>>> +   - powerdown-gpio: OF device-tree gpio specification
>>
>> Can a regulator be used instead of gpio in other board case?
>>
>
> No, not to my knowledge.
>

Hm.. plz check it out again. the gpio pin is specific to board, and
the the gpio be used as power source trigger could be replaced with a
regulator according to board design. So you should consider all
possibilities even though there are no other cases yet: other board
could  use a regulator instead.

>
>>> +   - reset-gpio: OF device-tree gpio specification
>>> +   - edid-emulation: The EDID emulation entry to use
>>> +   +---++--+
>>> +   | Value | Resolution | Description  |
>>> +   |   0   |  1024x768  | NXP Generic  |
>>> +   |   1   |  1920x1080 | NXP Generic  |
>>> +   |   2   |  1920x1080 | NXP Generic  |
>>> +   |   3   |  1600x900  | Samsung LTM200KT |
>>> +   |   4   |  1920x1080 | Samsung LTM230HT |
>>> +   |   5   |  1366x768  | NXP Generic  |
>>> +   |   6   |  1600x900  | ChiMei M215HGE   |
>>> +   +---++--+
>>> +
>>> +Example:
>>> +   ptn3460-bridge@20 {
>>> +   compatible = "nxp,ptn3460";
>>> +   reg = <0x20>;
>>> +   powerdown-gpio = < 5 1 0 0>;
>>> +   reset-gpio = < 5 1 0 0>;
>>> +   edid-emulation = <5>;
>>> +   };
>>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>>> index 95d..cd7bfb3 100644
>>> --- a/drivers/gpu/drm/Kconfig
>>> +++ b/drivers/gpu/drm/Kconfig
>>> @@ -236,3 +236,5 @@ source "drivers/gpu/drm/tilcdc/Kconfig"
>>>  source "drivers/gpu/drm/qxl/Kconfig"
>>>
>>>  source "drivers/gpu/drm/msm/Kconfig"
>>> +
>>> +source "drivers/gpu/drm/bridge/Kconfig"
>>> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
>>> index f089adf..9234253 100644
>>> --- a/drivers/gpu/drm/Makefile
>>> +++ b/drivers/gpu/drm/Makefile
>>> @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
>>>  obj-$(CONFIG_DRM_QXL) += qxl/
>>>  obj-$(CONFIG_DRM_MSM) += msm/
>>>  obj-y  += i2c/
>>> +obj-y  += bridge/
>>> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
>>> new file mode 100644
>>> index 000..f8db069
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/bridge/Kconfig
>>> @@ -0,0 +1,4 @@
>>> +config DRM_PTN3460
>>> +   tristate "PTN3460 DP/LVDS bridge"
>>> +   depends on DRM && I2C
>>> +   ---help---
>>> diff --git a/drivers/gpu/drm/bridge/Makefile 
>>> b/drivers/gpu/drm/bridge/Makefile
>>> new file mode 100644
>>> index 000..b4733e1
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/bridge/Makefile
>>> @@ -0,0 +1,3 @@
>>> +ccflags-y := -Iinclude/drm
>>> +
>>> +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
>>> diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
>>> b/drivers/gpu/drm/bridge/ptn3460.c
>>> new file mode 100644
>>> index 000..a9e5c1a
>>> --- /dev/null
>>> +++ b/drivers/gpu/drm/bridge/ptn3460.c
>>> @@ -0,0 +1,349 @@
>>> +/*
>>> + * NXP PTN3460 DP/LVDS bridge driver
>>> + *
>>> + * Copyright (C) 2013 Google, Inc.
>>> + *
>>> + * This software is licensed under the terms of the GNU General Public
>>> + * License version 2, as published by the Free Software Foundation, and
>>> + * may be copied, distributed, and 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Sean Paul
On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae  wrote:
> Hi, thank you for your contribution and the below is my short comments,
>
> 2013/10/2 Sean Paul :
>> This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
>> bridge chip.
>>
>> Signed-off-by: Sean Paul 
>> ---
>>  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
>>  drivers/gpu/drm/Kconfig|   2 +
>>  drivers/gpu/drm/Makefile   |   1 +
>>  drivers/gpu/drm/bridge/Kconfig |   4 +
>>  drivers/gpu/drm/bridge/Makefile|   3 +
>>  drivers/gpu/drm/bridge/ptn3460.c   | 349 
>> +
>>  include/drm/bridge/ptn3460.h   |  36 +++
>>  7 files changed, 422 insertions(+)
>>  create mode 100644 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>>  create mode 100644 drivers/gpu/drm/bridge/Kconfig
>>  create mode 100644 drivers/gpu/drm/bridge/Makefile
>>  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
>>  create mode 100644 include/drm/bridge/ptn3460.h
>>
>> diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
>> b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>> new file mode 100644
>> index 000..c1cd329
>> --- /dev/null
>> +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>> @@ -0,0 +1,27 @@
>> +ptn3460-bridge bindings
>> +
>> +Required properties:
>> +   - compatible: "nxp,ptn3460"
>> +   - reg: i2c address of the bridge
>> +   - powerdown-gpio: OF device-tree gpio specification
>
> Can a regulator be used instead of gpio in other board case?
>

No, not to my knowledge.


>> +   - reset-gpio: OF device-tree gpio specification
>> +   - edid-emulation: The EDID emulation entry to use
>> +   +---++--+
>> +   | Value | Resolution | Description  |
>> +   |   0   |  1024x768  | NXP Generic  |
>> +   |   1   |  1920x1080 | NXP Generic  |
>> +   |   2   |  1920x1080 | NXP Generic  |
>> +   |   3   |  1600x900  | Samsung LTM200KT |
>> +   |   4   |  1920x1080 | Samsung LTM230HT |
>> +   |   5   |  1366x768  | NXP Generic  |
>> +   |   6   |  1600x900  | ChiMei M215HGE   |
>> +   +---++--+
>> +
>> +Example:
>> +   ptn3460-bridge@20 {
>> +   compatible = "nxp,ptn3460";
>> +   reg = <0x20>;
>> +   powerdown-gpio = < 5 1 0 0>;
>> +   reset-gpio = < 5 1 0 0>;
>> +   edid-emulation = <5>;
>> +   };
>> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
>> index 95d..cd7bfb3 100644
>> --- a/drivers/gpu/drm/Kconfig
>> +++ b/drivers/gpu/drm/Kconfig
>> @@ -236,3 +236,5 @@ source "drivers/gpu/drm/tilcdc/Kconfig"
>>  source "drivers/gpu/drm/qxl/Kconfig"
>>
>>  source "drivers/gpu/drm/msm/Kconfig"
>> +
>> +source "drivers/gpu/drm/bridge/Kconfig"
>> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
>> index f089adf..9234253 100644
>> --- a/drivers/gpu/drm/Makefile
>> +++ b/drivers/gpu/drm/Makefile
>> @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
>>  obj-$(CONFIG_DRM_QXL) += qxl/
>>  obj-$(CONFIG_DRM_MSM) += msm/
>>  obj-y  += i2c/
>> +obj-y  += bridge/
>> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
>> new file mode 100644
>> index 000..f8db069
>> --- /dev/null
>> +++ b/drivers/gpu/drm/bridge/Kconfig
>> @@ -0,0 +1,4 @@
>> +config DRM_PTN3460
>> +   tristate "PTN3460 DP/LVDS bridge"
>> +   depends on DRM && I2C
>> +   ---help---
>> diff --git a/drivers/gpu/drm/bridge/Makefile 
>> b/drivers/gpu/drm/bridge/Makefile
>> new file mode 100644
>> index 000..b4733e1
>> --- /dev/null
>> +++ b/drivers/gpu/drm/bridge/Makefile
>> @@ -0,0 +1,3 @@
>> +ccflags-y := -Iinclude/drm
>> +
>> +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
>> diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
>> b/drivers/gpu/drm/bridge/ptn3460.c
>> new file mode 100644
>> index 000..a9e5c1a
>> --- /dev/null
>> +++ b/drivers/gpu/drm/bridge/ptn3460.c
>> @@ -0,0 +1,349 @@
>> +/*
>> + * NXP PTN3460 DP/LVDS bridge driver
>> + *
>> + * Copyright (C) 2013 Google, Inc.
>> + *
>> + * This software is licensed under the terms of the GNU General Public
>> + * License version 2, as published by the Free Software Foundation, and
>> + * may be copied, distributed, and modified under those terms.
>> + *
>> + * This program is distributed in the hope that it will be useful,
>> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
>> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
>> + * GNU General Public License for more details.
>> + */
>> +
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +#include 
>> +
>> +#include "drmP.h"
>> +#include "drm_edid.h"
>> 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
Hi, thank you for your contribution and the below is my short comments,

2013/10/2 Sean Paul :
> This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
> bridge chip.
>
> Signed-off-by: Sean Paul 
> ---
>  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
>  drivers/gpu/drm/Kconfig|   2 +
>  drivers/gpu/drm/Makefile   |   1 +
>  drivers/gpu/drm/bridge/Kconfig |   4 +
>  drivers/gpu/drm/bridge/Makefile|   3 +
>  drivers/gpu/drm/bridge/ptn3460.c   | 349 
> +
>  include/drm/bridge/ptn3460.h   |  36 +++
>  7 files changed, 422 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
>  create mode 100644 drivers/gpu/drm/bridge/Kconfig
>  create mode 100644 drivers/gpu/drm/bridge/Makefile
>  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
>  create mode 100644 include/drm/bridge/ptn3460.h
>
> diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
> b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
> new file mode 100644
> index 000..c1cd329
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
> @@ -0,0 +1,27 @@
> +ptn3460-bridge bindings
> +
> +Required properties:
> +   - compatible: "nxp,ptn3460"
> +   - reg: i2c address of the bridge
> +   - powerdown-gpio: OF device-tree gpio specification

Can a regulator be used instead of gpio in other board case?

> +   - reset-gpio: OF device-tree gpio specification
> +   - edid-emulation: The EDID emulation entry to use
> +   +---++--+
> +   | Value | Resolution | Description  |
> +   |   0   |  1024x768  | NXP Generic  |
> +   |   1   |  1920x1080 | NXP Generic  |
> +   |   2   |  1920x1080 | NXP Generic  |
> +   |   3   |  1600x900  | Samsung LTM200KT |
> +   |   4   |  1920x1080 | Samsung LTM230HT |
> +   |   5   |  1366x768  | NXP Generic  |
> +   |   6   |  1600x900  | ChiMei M215HGE   |
> +   +---++--+
> +
> +Example:
> +   ptn3460-bridge@20 {
> +   compatible = "nxp,ptn3460";
> +   reg = <0x20>;
> +   powerdown-gpio = < 5 1 0 0>;
> +   reset-gpio = < 5 1 0 0>;
> +   edid-emulation = <5>;
> +   };
> diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
> index 95d..cd7bfb3 100644
> --- a/drivers/gpu/drm/Kconfig
> +++ b/drivers/gpu/drm/Kconfig
> @@ -236,3 +236,5 @@ source "drivers/gpu/drm/tilcdc/Kconfig"
>  source "drivers/gpu/drm/qxl/Kconfig"
>
>  source "drivers/gpu/drm/msm/Kconfig"
> +
> +source "drivers/gpu/drm/bridge/Kconfig"
> diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
> index f089adf..9234253 100644
> --- a/drivers/gpu/drm/Makefile
> +++ b/drivers/gpu/drm/Makefile
> @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
>  obj-$(CONFIG_DRM_QXL) += qxl/
>  obj-$(CONFIG_DRM_MSM) += msm/
>  obj-y  += i2c/
> +obj-y  += bridge/
> diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
> new file mode 100644
> index 000..f8db069
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/Kconfig
> @@ -0,0 +1,4 @@
> +config DRM_PTN3460
> +   tristate "PTN3460 DP/LVDS bridge"
> +   depends on DRM && I2C
> +   ---help---
> diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
> new file mode 100644
> index 000..b4733e1
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/Makefile
> @@ -0,0 +1,3 @@
> +ccflags-y := -Iinclude/drm
> +
> +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
> diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
> b/drivers/gpu/drm/bridge/ptn3460.c
> new file mode 100644
> index 000..a9e5c1a
> --- /dev/null
> +++ b/drivers/gpu/drm/bridge/ptn3460.c
> @@ -0,0 +1,349 @@
> +/*
> + * NXP PTN3460 DP/LVDS bridge driver
> + *
> + * Copyright (C) 2013 Google, Inc.
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +#include 
> +
> +#include "drmP.h"
> +#include "drm_edid.h"
> +#include "drm_crtc.h"
> +#include "drm_crtc_helper.h"
> +
> +#include "bridge/ptn3460.h"
> +
> +#define PTN3460_EDID_ADDR  0x0
> +#define PTN3460_EDID_EMULATION_ADDR0x84
> +#define 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
Hi, thank you for your contribution and the below is my short comments,

2013/10/2 Sean Paul seanp...@chromium.org:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: nxp,ptn3460
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification

Can a regulator be used instead of gpio in other board case?

 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source drivers/gpu/drm/tilcdc/Kconfig
  source drivers/gpu/drm/qxl/Kconfig

  source drivers/gpu/drm/msm/Kconfig
 +
 +source drivers/gpu/drm/bridge/Kconfig
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate PTN3460 DP/LVDS bridge
 +   depends on DRM  I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +
 +#include linux/module.h
 +#include linux/of.h
 +#include linux/of_gpio.h
 +#include linux/i2c.h
 +#include linux/gpio.h
 +#include linux/delay.h
 +
 +#include drmP.h
 +#include drm_edid.h
 +#include drm_crtc.h
 +#include drm_crtc_helper.h
 +
 +#include bridge/ptn3460.h
 +
 +#define PTN3460_EDID_ADDR  0x0
 +#define PTN3460_EDID_EMULATION_ADDR0x84
 +#define PTN3460_EDID_ENABLE_EMULATION  0
 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Sean Paul
On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Hi, thank you for your contribution and the below is my short comments,

 2013/10/2 Sean Paul seanp...@chromium.org:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: nxp,ptn3460
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification

 Can a regulator be used instead of gpio in other board case?


No, not to my knowledge.


 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source drivers/gpu/drm/tilcdc/Kconfig
  source drivers/gpu/drm/qxl/Kconfig

  source drivers/gpu/drm/msm/Kconfig
 +
 +source drivers/gpu/drm/bridge/Kconfig
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate PTN3460 DP/LVDS bridge
 +   depends on DRM  I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile 
 b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +
 +#include linux/module.h
 +#include linux/of.h
 +#include linux/of_gpio.h
 +#include linux/i2c.h
 +#include linux/gpio.h
 +#include linux/delay.h
 +
 +#include drmP.h
 +#include drm_edid.h
 +#include drm_crtc.h
 +#include drm_crtc_helper.h
 +
 +#include bridge/ptn3460.h
 +
 +#define PTN3460_EDID_ADDR  0x0
 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/3 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Hi, thank you for your contribution and the below is my short comments,

 2013/10/2 Sean Paul seanp...@chromium.org:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: nxp,ptn3460
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification

 Can a regulator be used instead of gpio in other board case?


 No, not to my knowledge.


Hm.. plz check it out again. the gpio pin is specific to board, and
the the gpio be used as power source trigger could be replaced with a
regulator according to board design. So you should consider all
possibilities even though there are no other cases yet: other board
could  use a regulator instead.


 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source drivers/gpu/drm/tilcdc/Kconfig
  source drivers/gpu/drm/qxl/Kconfig

  source drivers/gpu/drm/msm/Kconfig
 +
 +source drivers/gpu/drm/bridge/Kconfig
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate PTN3460 DP/LVDS bridge
 +   depends on DRM  I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile 
 b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Olof Johansson
On Thu, Oct 3, 2013 at 10:39 AM, Inki Dae inki@samsung.com wrote:
 2013/10/3 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Can a regulator be used instead of gpio in other board case?


 No, not to my knowledge.


 Hm.. plz check it out again. the gpio pin is specific to board, and
 the the gpio be used as power source trigger could be replaced with a
 regulator according to board design. So you should consider all
 possibilities even though there are no other cases yet: other board
 could  use a regulator instead.

Take a look at the data sheet, it is publicly available.

PD_N is not a power supply input, so modelling it as a regulator makes no sense:

If PD_N is LOW, then the device is in Deep power-down completely,
even if supply rail is ON; for the device to be able to operate, the
PD_N pin must be HIGH.



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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Sean Paul
On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae inki@samsung.com wrote:
 2013/10/3 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Hi, thank you for your contribution and the below is my short comments,

 2013/10/2 Sean Paul seanp...@chromium.org:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 
 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: nxp,ptn3460
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification

 Can a regulator be used instead of gpio in other board case?


 No, not to my knowledge.


 Hm.. plz check it out again. the gpio pin is specific to board, and
 the the gpio be used as power source trigger could be replaced with a
 regulator according to board design. So you should consider all
 possibilities even though there are no other cases yet: other board
 could  use a regulator instead.


 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source drivers/gpu/drm/tilcdc/Kconfig
  source drivers/gpu/drm/qxl/Kconfig

  source drivers/gpu/drm/msm/Kconfig
 +
 +source drivers/gpu/drm/bridge/Kconfig
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig 
 b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate PTN3460 DP/LVDS bridge
 +   depends on DRM  I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile 
 b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/4 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae inki@samsung.com wrote:
 2013/10/3 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Hi, thank you for your contribution and the below is my short comments,

 2013/10/2 Sean Paul seanp...@chromium.org:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 
 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: nxp,ptn3460
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification

 Can a regulator be used instead of gpio in other board case?


 No, not to my knowledge.


 Hm.. plz check it out again. the gpio pin is specific to board, and
 the the gpio be used as power source trigger could be replaced with a
 regulator according to board design. So you should consider all
 possibilities even though there are no other cases yet: other board
 could  use a regulator instead.


 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source drivers/gpu/drm/tilcdc/Kconfig
  source drivers/gpu/drm/qxl/Kconfig

  source drivers/gpu/drm/msm/Kconfig
 +
 +source drivers/gpu/drm/bridge/Kconfig
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig 
 b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate PTN3460 DP/LVDS bridge
 +   depends on DRM  I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile 
 b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Sean Paul
On Thu, Oct 3, 2013 at 2:23 PM, Inki Dae inki@samsung.com wrote:
 2013/10/4 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae inki@samsung.com wrote:
 2013/10/3 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Hi, thank you for your contribution and the below is my short comments,

 2013/10/2 Sean Paul seanp...@chromium.org:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 
 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: nxp,ptn3460
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification

 Can a regulator be used instead of gpio in other board case?


 No, not to my knowledge.


 Hm.. plz check it out again. the gpio pin is specific to board, and
 the the gpio be used as power source trigger could be replaced with a
 regulator according to board design. So you should consider all
 possibilities even though there are no other cases yet: other board
 could  use a regulator instead.


 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source drivers/gpu/drm/tilcdc/Kconfig
  source drivers/gpu/drm/qxl/Kconfig

  source drivers/gpu/drm/msm/Kconfig
 +
 +source drivers/gpu/drm/bridge/Kconfig
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig 
 b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate PTN3460 DP/LVDS bridge
 +   depends on DRM  I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile 
 b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This program is distributed in the hope that it 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/4 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 2:23 PM, Inki Dae inki@samsung.com wrote:
 2013/10/4 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 1:39 PM, Inki Dae inki@samsung.com wrote:
 2013/10/3 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Hi, thank you for your contribution and the below is my short comments,

 2013/10/2 Sean Paul seanp...@chromium.org:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---
  .../devicetree/bindings/drm/bridge/ptn3460.txt |  27 ++
  drivers/gpu/drm/Kconfig|   2 +
  drivers/gpu/drm/Makefile   |   1 +
  drivers/gpu/drm/bridge/Kconfig |   4 +
  drivers/gpu/drm/bridge/Makefile|   3 +
  drivers/gpu/drm/bridge/ptn3460.c   | 349 
 +
  include/drm/bridge/ptn3460.h   |  36 +++
  7 files changed, 422 insertions(+)
  create mode 100644 
 Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
  create mode 100644 drivers/gpu/drm/bridge/Kconfig
  create mode 100644 drivers/gpu/drm/bridge/Makefile
  create mode 100644 drivers/gpu/drm/bridge/ptn3460.c
  create mode 100644 include/drm/bridge/ptn3460.h

 diff --git a/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt 
 b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 new file mode 100644
 index 000..c1cd329
 --- /dev/null
 +++ b/Documentation/devicetree/bindings/drm/bridge/ptn3460.txt
 @@ -0,0 +1,27 @@
 +ptn3460-bridge bindings
 +
 +Required properties:
 +   - compatible: nxp,ptn3460
 +   - reg: i2c address of the bridge
 +   - powerdown-gpio: OF device-tree gpio specification

 Can a regulator be used instead of gpio in other board case?


 No, not to my knowledge.


 Hm.. plz check it out again. the gpio pin is specific to board, and
 the the gpio be used as power source trigger could be replaced with a
 regulator according to board design. So you should consider all
 possibilities even though there are no other cases yet: other board
 could  use a regulator instead.


 +   - reset-gpio: OF device-tree gpio specification
 +   - edid-emulation: The EDID emulation entry to use
 +   +---++--+
 +   | Value | Resolution | Description  |
 +   |   0   |  1024x768  | NXP Generic  |
 +   |   1   |  1920x1080 | NXP Generic  |
 +   |   2   |  1920x1080 | NXP Generic  |
 +   |   3   |  1600x900  | Samsung LTM200KT |
 +   |   4   |  1920x1080 | Samsung LTM230HT |
 +   |   5   |  1366x768  | NXP Generic  |
 +   |   6   |  1600x900  | ChiMei M215HGE   |
 +   +---++--+
 +
 +Example:
 +   ptn3460-bridge@20 {
 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };
 diff --git a/drivers/gpu/drm/Kconfig b/drivers/gpu/drm/Kconfig
 index 95d..cd7bfb3 100644
 --- a/drivers/gpu/drm/Kconfig
 +++ b/drivers/gpu/drm/Kconfig
 @@ -236,3 +236,5 @@ source drivers/gpu/drm/tilcdc/Kconfig
  source drivers/gpu/drm/qxl/Kconfig

  source drivers/gpu/drm/msm/Kconfig
 +
 +source drivers/gpu/drm/bridge/Kconfig
 diff --git a/drivers/gpu/drm/Makefile b/drivers/gpu/drm/Makefile
 index f089adf..9234253 100644
 --- a/drivers/gpu/drm/Makefile
 +++ b/drivers/gpu/drm/Makefile
 @@ -56,3 +56,4 @@ obj-$(CONFIG_DRM_TILCDC)  += tilcdc/
  obj-$(CONFIG_DRM_QXL) += qxl/
  obj-$(CONFIG_DRM_MSM) += msm/
  obj-y  += i2c/
 +obj-y  += bridge/
 diff --git a/drivers/gpu/drm/bridge/Kconfig 
 b/drivers/gpu/drm/bridge/Kconfig
 new file mode 100644
 index 000..f8db069
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Kconfig
 @@ -0,0 +1,4 @@
 +config DRM_PTN3460
 +   tristate PTN3460 DP/LVDS bridge
 +   depends on DRM  I2C
 +   ---help---
 diff --git a/drivers/gpu/drm/bridge/Makefile 
 b/drivers/gpu/drm/bridge/Makefile
 new file mode 100644
 index 000..b4733e1
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/Makefile
 @@ -0,0 +1,3 @@
 +ccflags-y := -Iinclude/drm
 +
 +obj-$(CONFIG_DRM_PTN3460) += ptn3460.o
 diff --git a/drivers/gpu/drm/bridge/ptn3460.c 
 b/drivers/gpu/drm/bridge/ptn3460.c
 new file mode 100644
 index 000..a9e5c1a
 --- /dev/null
 +++ b/drivers/gpu/drm/bridge/ptn3460.c
 @@ -0,0 +1,349 @@
 +/*
 + * NXP PTN3460 DP/LVDS bridge driver
 + *
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This 

Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-03 Thread Inki Dae
2013/10/4 Olof Johansson o...@lixom.net:
 On Thu, Oct 3, 2013 at 10:39 AM, Inki Dae inki@samsung.com wrote:
 2013/10/3 Sean Paul seanp...@chromium.org:
 On Thu, Oct 3, 2013 at 9:55 AM, Inki Dae inki@samsung.com wrote:
 Can a regulator be used instead of gpio in other board case?


 No, not to my knowledge.


 Hm.. plz check it out again. the gpio pin is specific to board, and
 the the gpio be used as power source trigger could be replaced with a
 regulator according to board design. So you should consider all
 possibilities even though there are no other cases yet: other board
 could  use a regulator instead.

 Take a look at the data sheet, it is publicly available.

 PD_N is not a power supply input, so modelling it as a regulator makes no 
 sense:

 If PD_N is LOW, then the device is in Deep power-down completely,
 even if supply rail is ON; for the device to be able to operate, the
 PD_N pin must be HIGH.


I still think the pin could be replaced with a regulator. But
lvds-bridge node has powerdown-gpio property - it say this board
will use gpio pin - specific to board.  So it seems no problem.



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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-02 Thread Olof Johansson
Hi,


On Tue, Oct 1, 2013 at 4:40 PM, Sean Paul  wrote:
> This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
> bridge chip.
>
> Signed-off-by: Sean Paul 
> ---

[...]

> +Example:
> +   ptn3460-bridge@20 {

Nit: Name is usually generic device name, i.e. "lvds-bridge" or
something like that.

> +   compatible = "nxp,ptn3460";
> +   reg = <0x20>;
> +   powerdown-gpio = < 5 1 0 0>;
> +   reset-gpio = < 5 1 0 0>;
> +   edid-emulation = <5>;
> +   };

[...]


> diff --git a/include/drm/bridge/ptn3460.h b/include/drm/bridge/ptn3460.h
> new file mode 100644
> index 000..157ffa1
> --- /dev/null
> +++ b/include/drm/bridge/ptn3460.h
> @@ -0,0 +1,36 @@
> +/*
> + * Copyright (C) 2013 Google, Inc.
> + *
> + * This software is licensed under the terms of the GNU General Public
> + * License version 2, as published by the Free Software Foundation, and
> + * may be copied, distributed, and modified under those terms.
> + *
> + * This program is distributed in the hope that it will be useful,
> + * but WITHOUT ANY WARRANTY; without even the implied warranty of
> + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + * GNU General Public License for more details.
> + */
> +
> +#ifndef _DRM_BRIDGE_PTN3460_H_
> +#define _DRM_BRIDGE_PTN3460_H_
> +
> +struct drm_device;
> +struct drm_encoder;
> +struct i2c_client;
> +struct device_node;
> +
> +#ifdef CONFIG_DRM_PTN3460
> +
> +int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder,
> +   struct i2c_client *client, struct device_node *node);
> +#else
> +
> +int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder,
> +   struct i2c_client *client, struct device_node *node)

This should be static inline int ptn3460_init(...)

> +{
> +   return 0;
> +}


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


Re: [PATCH 3/5] drm/bridge: Add PTN3460 bridge driver

2013-10-02 Thread Olof Johansson
Hi,


On Tue, Oct 1, 2013 at 4:40 PM, Sean Paul seanp...@chromium.org wrote:
 This patch adds a drm_bridge driver for the PTN3460 DisplayPort to LVDS
 bridge chip.

 Signed-off-by: Sean Paul seanp...@chromium.org
 ---

[...]

 +Example:
 +   ptn3460-bridge@20 {

Nit: Name is usually generic device name, i.e. lvds-bridge or
something like that.

 +   compatible = nxp,ptn3460;
 +   reg = 0x20;
 +   powerdown-gpio = gpy2 5 1 0 0;
 +   reset-gpio = gpx1 5 1 0 0;
 +   edid-emulation = 5;
 +   };

[...]


 diff --git a/include/drm/bridge/ptn3460.h b/include/drm/bridge/ptn3460.h
 new file mode 100644
 index 000..157ffa1
 --- /dev/null
 +++ b/include/drm/bridge/ptn3460.h
 @@ -0,0 +1,36 @@
 +/*
 + * Copyright (C) 2013 Google, Inc.
 + *
 + * This software is licensed under the terms of the GNU General Public
 + * License version 2, as published by the Free Software Foundation, and
 + * may be copied, distributed, and modified under those terms.
 + *
 + * This program is distributed in the hope that it will be useful,
 + * but WITHOUT ANY WARRANTY; without even the implied warranty of
 + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 + * GNU General Public License for more details.
 + */
 +
 +#ifndef _DRM_BRIDGE_PTN3460_H_
 +#define _DRM_BRIDGE_PTN3460_H_
 +
 +struct drm_device;
 +struct drm_encoder;
 +struct i2c_client;
 +struct device_node;
 +
 +#ifdef CONFIG_DRM_PTN3460
 +
 +int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder,
 +   struct i2c_client *client, struct device_node *node);
 +#else
 +
 +int ptn3460_init(struct drm_device *dev, struct drm_encoder *encoder,
 +   struct i2c_client *client, struct device_node *node)

This should be static inline int ptn3460_init(...)

 +{
 +   return 0;
 +}


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