Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-11 Thread Mauro Carvalho Chehab
Samuel Ortiz wrote:

 Now when the radio driver made it into the media tree, can I post an
 updated MFD which defines these drivers too?
 Is a complete MFD patch preferred, or just an incremental against the
 last one?
 Since the mfd driver is currently merged into Mauro's tree, you should make
 incremental patches against it. At least that's how I'd take it in my tree.
 Mauro, do you agree ?

Yes.

Richard, just send me an incremental patch against my -git tree.

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-09 Thread Richard Röjfors
On 2/4/10 10:28 AM, Samuel Ortiz wrote:
 On Wed, Feb 03, 2010 at 05:23:57PM +, Mauro Carvalho Chehab wrote:
 Ok, thanks again for your understanding. This is definitely material for the
 next merge window, so I'll merge it into my for-next branch.

 The last version of the driver is OK for merging. However, I noticed one 
 issue:
 it depends on two drivers that were already merged on my tree:

 +config RADIO_TIMBERDALE
 +   tristate Enable the Timberdale radio driver
 +   depends on MFD_TIMBERDALE  VIDEO_V4L2
 +   select RADIO_TEF6862
 +   select RADIO_SAA7706H

 Currently, the dependency seems to happen only at Kconfig level.

 Maybe the better is to return to the previous plan: apply it via my tree, as 
 the better
 is to have it added after those two radio i2c drivers.
 I'm fine with that. Richard sent me a 2nd version of his patch that I was
 about to merge.
 Richard, could you please post this patch here, or to lkml with Mauro cc'ed ?
 I'll add my SOB to it and then it will go through Mauro's tree.

Now when the radio driver made it into the media tree, can I post an
updated MFD which defines these drivers too?
Is a complete MFD patch preferred, or just an incremental against the
last one?

--Richard
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-03 Thread Mauro Carvalho Chehab
Hi Richard,

Richard Röjfors wrote:
 The timberdale FPGA is found on the Intel in-Vehicle Infotainment reference 
 board
 russelville.
 
 The driver is a PCI driver which chunks up the I/O memory and distributes 
 interrupts
 to a number of platform devices for each IP inside the FPGA.
 
 Signed-off-by: Richard Röjfors richard.rojf...@pelagicore.com

I'm not sure how to deal with this patch. It doesn't contain anything related
to V4L2 inside it, nor it applies to drivers/media, but it depends on the 
radio-timb
driver that you submitted us.

As this patch will be committed at mfd tree, the better is if Samuel can review
this patch and give his ack. I'll add it together with the V4L2 driver and 
submit them
via my tree.

Samuel,

Would this way work for you?

Cheers,
Mauro.

 ---
 diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
 index 8782978..f92673b 100644
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
 @@ -348,6 +348,17 @@ config AB4500_CORE
 read/write functions for the devices to get access to this chip.
 This chip embeds various other multimedia funtionalities as well.
 
 +config MFD_TIMBERDALE
 + tristate Support for the Timberdale FPGA
 + select MFD_CORE
 + depends on PCI
 + ---help---
 + This is the core driver for the timberdale FPGA. This device is a
 + multifunction device which exposes numerous platform devices.
 +
 + The timberdale FPGA can be found on the Intel Atom development board
 + for in-vehicle infontainment, called Russellville.
 +
  endmenu
 
  menu Multimedia Capabilities Port drivers
 diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
 index e09eb48..53375ac 100644
 --- a/drivers/mfd/Makefile
 +++ b/drivers/mfd/Makefile
 @@ -55,4 +55,6 @@ obj-$(CONFIG_AB3100_CORE)   += ab3100-core.o
  obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o
  obj-$(CONFIG_AB4500_CORE)+= ab4500-core.o
  obj-$(CONFIG_MFD_88PM8607)   += 88pm8607.o
 -obj-$(CONFIG_PMIC_ADP5520)   += adp5520.o
 \ No newline at end of file
 +obj-$(CONFIG_PMIC_ADP5520)   += adp5520.o
 +
 +obj-$(CONFIG_MFD_TIMBERDALE) += timberdale.o
 diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
 new file mode 100644
 index 000..90f745b
 --- /dev/null
 +++ b/drivers/mfd/timberdale.c
 @@ -0,0 +1,667 @@
 +/*
 + * timberdale.c timberdale FPGA MFD driver
 + * Copyright (c) 2009 Intel Corporation
 + *
 + * This program is free software; you can redistribute it and/or modify
 + * it under the terms of the GNU General Public License version 2 as
 + * published by the Free Software Foundation.
 + *
 + * 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.
 + *
 + * You should have received a copy of the GNU General Public License
 + * along with this program; if not, write to the Free Software
 + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 + */
 +
 +/* Supports:
 + * Timberdale FPGA
 + */
 +
 +#include linux/kernel.h
 +#include linux/module.h
 +#include linux/pci.h
 +#include linux/msi.h
 +#include linux/mfd/core.h
 +
 +#include linux/timb_gpio.h
 +
 +#include linux/i2c.h
 +#include linux/i2c-ocores.h
 +#include linux/i2c/tsc2007.h
 +
 +#include linux/spi/spi.h
 +#include linux/spi/xilinx_spi.h
 +#include linux/spi/max7301.h
 +#include linux/spi/mc33880.h
 +
 +#include timberdale.h
 +
 +#define DRIVER_NAME timberdale
 +
 +struct timberdale_device {
 + resource_size_t ctl_mapbase;
 + unsigned char __iomem   *ctl_membase;
 + struct {
 + u32 major;
 + u32 minor;
 + u32 config;
 + } fw;
 +};
 +
 +/*--*/
 +
 +static struct tsc2007_platform_data timberdale_tsc2007_platform_data = {
 + .model = 2003,
 + .x_plate_ohms = 100
 +};
 +
 +static struct i2c_board_info timberdale_i2c_board_info[] = {
 + {
 + I2C_BOARD_INFO(tsc2007, 0x48),
 + .platform_data = timberdale_tsc2007_platform_data,
 + .irq = IRQ_TIMBERDALE_TSC_INT
 + },
 +};
 +
 +static __devinitdata struct ocores_i2c_platform_data
 +timberdale_ocores_platform_data = {
 + .regstep = 4,
 + .clock_khz = 62500,
 + .devices = timberdale_i2c_board_info,
 + .num_devices = ARRAY_SIZE(timberdale_i2c_board_info)
 +};
 +
 +const static __devinitconst struct resource timberdale_ocores_resources[] = {
 + {
 + .start  = OCORESOFFSET,
 + .end= OCORESEND,
 + .flags  = IORESOURCE_MEM,
 + },
 + {
 + .start  = IRQ_TIMBERDALE_I2C,
 + .end= IRQ_TIMBERDALE_I2C,
 + .flags  = IORESOURCE_IRQ,
 + },
 +};
 +
 +const struct max7301_platform_data timberdale_max7301_platform_data = {
 + .base = 200
 +};
 +
 +const struct 

Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-03 Thread Richard Röjfors

On 02/03/2010 10:16 AM, Mauro Carvalho Chehab wrote:

Hi Richard,

Richard Röjfors wrote:

The timberdale FPGA is found on the Intel in-Vehicle Infotainment reference 
board
russelville.

The driver is a PCI driver which chunks up the I/O memory and distributes 
interrupts
to a number of platform devices for each IP inside the FPGA.

Signed-off-by: Richard Röjforsrichard.rojf...@pelagicore.com


I'm not sure how to deal with this patch. It doesn't contain anything related
to V4L2 inside it, nor it applies to drivers/media,


Sorry my address book tricked me. I was suppose to send it to LKML not the
Media mailing list.

I will resend the patch with the correct addresses in it.

 but it depends on the radio-timb driver that you submitted us.

Actually this MFD has more devices than in the current patch. These will
be incrementally added when the corresponding drivers goes into the kernel.

Sorry for the inconvenience.
--Richard

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


Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-03 Thread Mauro Carvalho Chehab
Richard Röjfors wrote:
 On 02/03/2010 10:16 AM, Mauro Carvalho Chehab wrote:
 Hi Richard,

 Richard Röjfors wrote:
 The timberdale FPGA is found on the Intel in-Vehicle Infotainment
 reference board
 russelville.

 The driver is a PCI driver which chunks up the I/O memory and
 distributes interrupts
 to a number of platform devices for each IP inside the FPGA.

 Signed-off-by: Richard Röjforsrichard.rojf...@pelagicore.com

 I'm not sure how to deal with this patch. It doesn't contain anything
 related
 to V4L2 inside it, nor it applies to drivers/media,
 
 Sorry my address book tricked me. I was suppose to send it to LKML not the
 Media mailing list.
 
 I will resend the patch with the correct addresses in it.
 
 but it depends on the radio-timb driver that you submitted us.
 
 Actually this MFD has more devices than in the current patch. These will
 be incrementally added when the corresponding drivers goes into the kernel.

Ah, ok.

 Sorry for the inconvenience.

No problem.

-- 

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-03 Thread Samuel Ortiz
Hi Mauro,

On Wed, Feb 03, 2010 at 09:16:07AM +, Mauro Carvalho Chehab wrote:
 Hi Richard,
 
 Richard Röjfors wrote:
  The timberdale FPGA is found on the Intel in-Vehicle Infotainment reference 
  board
  russelville.
 
  The driver is a PCI driver which chunks up the I/O memory and distributes 
  interrupts
  to a number of platform devices for each IP inside the FPGA.
 
  Signed-off-by: Richard Röjfors richard.rojf...@pelagicore.com
 
 I'm not sure how to deal with this patch. It doesn't contain anything related
 to V4L2 inside it, nor it applies to drivers/media, but it depends on the 
 radio-timb
 driver that you submitted us.
Actually, there are no build dependencies between those 2 drivers, which is
very good.


 As this patch will be committed at mfd tree, the better is if Samuel can 
 review
 this patch and give his ack. I'll add it together with the V4L2 driver and 
 submit them
 via my tree.
I'm going to review this patch right now. Typically, mfd core drivers and
their subdevices are submitted as a patchset via my tree, because the
subdevices drivers have dependencies with the core. The mfd core driver is
submitted without any dependencies, and then when the subdevices drivers are
submitted, we add relevant code to the mfd driver. This way we prevent any
build breakage or bisection mess.
The timberdale chip right now doesnt depend on anything, but will soon depend
on the radio driver that's on your tree, but also on a sound and on a network
driver. You'd have to take all those if Richard wants to push them right now.
So, what I propose is to take the timberdale mfd core driver and the radio
one, with your SOB. Then when Richard wants to submit additional subdevices
drivers I'll be able to take them and we'll avoid polluting your tree with non
media related drivers. Does that make sense to you ?

Cheers,
Samuel.

 
 Samuel,
 
 Would this way work for you?
 
 Cheers,
 Mauro.
 
  ---
  diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig
  index 8782978..f92673b 100644
  --- a/drivers/mfd/Kconfig
  +++ b/drivers/mfd/Kconfig
  @@ -348,6 +348,17 @@ config AB4500_CORE
  read/write functions for the devices to get access to this chip.
  This chip embeds various other multimedia funtionalities as well.
 
  +config MFD_TIMBERDALE
  + tristate Support for the Timberdale FPGA
  + select MFD_CORE
  + depends on PCI
  + ---help---
  + This is the core driver for the timberdale FPGA. This device is a
  + multifunction device which exposes numerous platform devices.
  +
  + The timberdale FPGA can be found on the Intel Atom development board
  + for in-vehicle infontainment, called Russellville.
  +
   endmenu
 
   menu Multimedia Capabilities Port drivers
  diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile
  index e09eb48..53375ac 100644
  --- a/drivers/mfd/Makefile
  +++ b/drivers/mfd/Makefile
  @@ -55,4 +55,6 @@ obj-$(CONFIG_AB3100_CORE)   += ab3100-core.o
   obj-$(CONFIG_AB3100_OTP) += ab3100-otp.o
   obj-$(CONFIG_AB4500_CORE)+= ab4500-core.o
   obj-$(CONFIG_MFD_88PM8607)   += 88pm8607.o
  -obj-$(CONFIG_PMIC_ADP5520)   += adp5520.o
  \ No newline at end of file
  +obj-$(CONFIG_PMIC_ADP5520)   += adp5520.o
  +
  +obj-$(CONFIG_MFD_TIMBERDALE) += timberdale.o
  diff --git a/drivers/mfd/timberdale.c b/drivers/mfd/timberdale.c
  new file mode 100644
  index 000..90f745b
  --- /dev/null
  +++ b/drivers/mfd/timberdale.c
  @@ -0,0 +1,667 @@
  +/*
  + * timberdale.c timberdale FPGA MFD driver
  + * Copyright (c) 2009 Intel Corporation
  + *
  + * This program is free software; you can redistribute it and/or modify
  + * it under the terms of the GNU General Public License version 2 as
  + * published by the Free Software Foundation.
  + *
  + * 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.
  + *
  + * You should have received a copy of the GNU General Public License
  + * along with this program; if not, write to the Free Software
  + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  + */
  +
  +/* Supports:
  + * Timberdale FPGA
  + */
  +
  +#include linux/kernel.h
  +#include linux/module.h
  +#include linux/pci.h
  +#include linux/msi.h
  +#include linux/mfd/core.h
  +
  +#include linux/timb_gpio.h
  +
  +#include linux/i2c.h
  +#include linux/i2c-ocores.h
  +#include linux/i2c/tsc2007.h
  +
  +#include linux/spi/spi.h
  +#include linux/spi/xilinx_spi.h
  +#include linux/spi/max7301.h
  +#include linux/spi/mc33880.h
  +
  +#include timberdale.h
  +
  +#define DRIVER_NAME timberdale
  +
  +struct timberdale_device {
  + resource_size_t ctl_mapbase;
  + unsigned char __iomem   *ctl_membase;
  + struct {
  + u32 major;
  + u32 minor;
  + u32 config;
  + } fw;
 

Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-03 Thread Mauro Carvalho Chehab
Samuel Ortiz wrote:

 I'm not sure how to deal with this patch. It doesn't contain anything related
 to V4L2 inside it, nor it applies to drivers/media, but it depends on the 
 radio-timb
 driver that you submitted us.
 Actually, there are no build dependencies between those 2 drivers, which is
 very good.

Yes, it is great.

 As this patch will be committed at mfd tree, the better is if Samuel can 
 review
 this patch and give his ack. I'll add it together with the V4L2 driver and 
 submit them
 via my tree.

 I'm going to review this patch right now. Typically, mfd core drivers and
 their subdevices are submitted as a patchset via my tree, because the
 subdevices drivers have dependencies with the core. The mfd core driver is
 submitted without any dependencies, and then when the subdevices drivers are
 submitted, we add relevant code to the mfd driver. This way we prevent any
 build breakage or bisection mess.

The drivers at media are generally very complex with dependencies on several 
other
subsystems. In general, almost all depends on i2c, alsa and input, and an 
increasing
number of drivers has also dependencies with platform_data added at 
arch-dependent
includes/drivers. Yet, this specific driver is simple.

I generally tend to add those drivers via my tree, since it is generally 
simpler to
prevent breakage/bisection troubles, but it is also ok for me if you want to add
them via your tree, after I get my ack.

 The timberdale chip right now doesnt depend on anything, but will soon depend
 on the radio driver that's on your tree, but also on a sound and on a network
 driver. You'd have to take all those if Richard wants to push them right now.

There were one or two minor changes requested on radio-timb patchset. After that
changes, we're ready to merge it.

 So, what I propose is to take the timberdale mfd core driver and the radio
 one, with your SOB. Then when Richard wants to submit additional subdevices
 drivers I'll be able to take them and we'll avoid polluting your tree with non
 media related drivers. Does that make sense to you ?

Yes, it does. I don't think Richard is urging with those patches, so my idea is
to keep them for linux-next. It would equally work for me if you add the patches
on your tree after my ack. The only merge conflicts we may expect from V4L side
are related to Kconfig/Makefile, and those will be easy to fix during the merge
period.

-- 

Cheers,
Mauro
--
To unsubscribe from this list: send the line unsubscribe linux-media in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH] mfd: Add support for the timberdale FPGA.

2010-02-03 Thread Samuel Ortiz
On Wed, Feb 03, 2010 at 10:18:17AM +, Mauro Carvalho Chehab wrote:
 Samuel Ortiz wrote:
  I'm going to review this patch right now. Typically, mfd core drivers and
  their subdevices are submitted as a patchset via my tree, because the
  subdevices drivers have dependencies with the core. The mfd core driver is
  submitted without any dependencies, and then when the subdevices drivers are
  submitted, we add relevant code to the mfd driver. This way we prevent any
  build breakage or bisection mess.
 
 The drivers at media are generally very complex with dependencies on several 
 other
 subsystems. In general, almost all depends on i2c, alsa and input, and an 
 increasing
 number of drivers has also dependencies with platform_data added at 
 arch-dependent
 includes/drivers. Yet, this specific driver is simple.
 
 I generally tend to add those drivers via my tree, since it is generally 
 simpler to
 prevent breakage/bisection troubles, 
I see that we have similar issues :)



 but it is also ok for me if you want to add
 them via your tree, after I get my ack.
Great, let's to that then.


  The timberdale chip right now doesnt depend on anything, but will soon 
  depend
  on the radio driver that's on your tree, but also on a sound and on a 
  network
  driver. You'd have to take all those if Richard wants to push them right 
  now.
 
 There were one or two minor changes requested on radio-timb patchset. After 
 that
 changes, we're ready to merge it.
All right, I'd appreciate if you could cc me on the relevant thread.



  So, what I propose is to take the timberdale mfd core driver and the radio
  one, with your SOB. Then when Richard wants to submit additional subdevices
  drivers I'll be able to take them and we'll avoid polluting your tree with 
  non
  media related drivers. Does that make sense to you ?
 
 Yes, it does. I don't think Richard is urging with those patches, so my idea 
 is
 to keep them for linux-next. It would equally work for me if you add the 
 patches
 on your tree after my ack. The only merge conflicts we may expect from V4L 
 side
 are related to Kconfig/Makefile, and those will be easy to fix during the 
 merge
 period.
Ok, thanks again for your understanding. This is definitely material for the
next merge window, so I'll merge it into my for-next branch.

Cheers,
Samuel.

-- 
Intel Open Source Technology Centre
http://oss.intel.com/
-
Intel Corporation SAS (French simplified joint stock company)
Registered headquarters: Les Montalets- 2, rue de Paris, 
92196 Meudon Cedex, France
Registration Number:  302 456 199 R.C.S. NANTERRE
Capital: 4,572,000 Euros

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.

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