Re: [PATCH v3] Staging : android: binder.c: Prefer seq_puts to seq_printf

2013-10-02 Thread Joe Perches
On Wed, 2013-10-02 at 01:02 -0400, Mathieu Rhéaume wrote:
 Changes since v2:
  * Fixed the indent in the method calls that had too many tab.
 
 8--8
 
 This patch changes seq_printf for seq_puts in binder.c.
 It fixes the warnings emitted by checkpatch.pl.

Please compile your patches before submitting them.

Checkpatch it pretty stupid and lots of these will
not compile correctly.

seq_puts takes only 2 arguments.

seq_puts(seq, string without %);


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: android: binder.c: Fixed 80 characters warnings from checkpatch.pl

2013-10-02 Thread Dan Carpenter
On Tue, Oct 01, 2013 at 09:39:48PM -0400, Mathieu Rhéaume wrote:
 Fixed a lot of warnings from checkpatch.pl about the 80 characters per line 
 limitation.
 

The code was better in the original, sorry.  Also this doesn't apply to
linux-next from Friday.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging : android: binder.c: Prefer seq_puts to seq_printf

2013-10-02 Thread Dan Carpenter
On Tue, Oct 01, 2013 at 09:57:36PM -0400, Mathieu Rhéaume wrote:
 This patch changes seq_printf for seq_puts in binder.c.
 It fixes the warnings emitted by checkpatch.pl.

Which warnings?  Seems like a false positive somehow because seq_puts()
is totally wrong here.  This doesn't compile.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging : android: binder.c: Prefer seq_puts to seq_printf

2013-10-02 Thread Joe Perches
On Wed, 2013-10-02 at 15:15 +1000, Ryan Mallon wrote:
 On 02/10/13 11:57, Mathieu Rhéaume wrote:
  This patch changes seq_printf for seq_puts in binder.c.
  It fixes the warnings emitted by checkpatch.pl.
[]
 Umm, this won't compile. seq_puts() is defined as:
 
   int seq_puts(struct seq_file *m, const char *s);
 
 checkpatch.pl does indeed complain about uses of seq_printf() in
 drivers/staging/android/binder.c which are passing formatted strings. At
 a quick glance it looks like checkpatch.pl is only checking for the
 format string on the same line as seq_printf(), so this files ugly
 coding style confuses the check. Joe?

True.

This patch should have fixed it.  It's in -next already.

https://lkml.org/lkml/2013/9/13/698

 Anyway, please don't blindly change things in the kernel without at
 least compile testing them.

Yes, please.

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH v3] Staging : android: binder.c: Prefer seq_puts to seq_printf

2013-10-02 Thread Dan Carpenter
On Wed, Oct 02, 2013 at 01:02:39AM -0400, Mathieu Rhéaume wrote:
 Changes since v2:
  * Fixed the indent in the method calls that had too many tab.
 
 8--8
 
 This patch changes seq_printf for seq_puts in binder.c.
 It fixes the warnings emitted by checkpatch.pl.

Checkpatch.pl is wrong here and this doesn't compile.

regards,
dan carpenter

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 00/22] staging: comedi: ni_6527: cleanup driver

2013-10-02 Thread Ian Abbott

On 2013-10-01 23:07, H Hartley Sweeten wrote:

Cleanup another comedi driver.

H Hartley Sweeten (22):
   staging: comedi: ni_6527: remove DRIVER_NAME define
   staging: comedi: ni_6527: remove unused NI6527_*_SIZE defines
   staging: comedi: ni_6527: remove unused DEBUG* defines
   staging: comedi: ni_6527: remove extra probe noise
   staging: comedi: ni_6527: factor out the code that sets the filter interval
   staging: comedi: ni_6527: factor out the code that sets the filter enables
   staging: comedi: ni_6527: tidy up ni6527_di_insn_config()
   staging: comedi: ni_6527: tidy up ni6527_{di,do}_insn_bits()
   staging: comedi: ni_6527: use dev-read_subdev in interrupt handler
   staging: comedi: ni_6527: tidy up ni6527_interrupt()
   staging: comedi: ni_6527: rename CamelCase defines for the clear register
   staging: comedi: ni_6527: rename CamelCase defines for the control register
   staging: comedi: ni_6527: tidy up ni6527_intr_cmd()
   staging: comedi: ni_6527: tidy up ni6527_intr_cancel()
   staging: comedi: ni_6527: tidy up ni6527_intr_insn_config()
   staging: comedi: ni_6527: remove COMEDI_MITE dependancy
   staging: comedi: ni_6527: introduce ni6527_reset()
   staging: comedi: ni_6527: tidy up the interrupt subdevice
   staging: comedi: ni_6527: tidy up ni6527_auto_attach()
   staging: comedi: ni_6527: tidy up the comedi_driver declaration
   staging: comedi: ni_6527: tidy up multi-line comments
   staging: comedi: ni_6527: change MODULE_DESCRIPTION

  drivers/staging/comedi/Kconfig   |   2 -
  drivers/staging/comedi/drivers/ni_6527.c | 457 ---
  2 files changed, 239 insertions(+), 220 deletions(-)


Looks good.  It could possibly do with an additional safety check in the 
interrupt routine to make damn sure it cannot access the subdevice 
before it is set up, rather than relying completely on the value read 
from the hardware's interrupt status register.


Reviewed-by: Ian Abbott abbo...@mev.co.uk

--
-=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk)=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH 18/22] staging: comedi: ni_6527: tidy up the interrupt subdevice

2013-10-02 Thread Ian Abbott

On 2013-10-02 12:17, Ian Abbott wrote:

On 2013-10-01 23:14, H Hartley Sweeten wrote:

Do the request_irq() before setting up the subdevices. Only initialize
the interrupt subdevice if the irq is actually available.


Since it's using IRQ_SHARED, you'll need add a test to the start of
ni6527_interrupt() to check dev-attached before accessing the subdevice:

 if (!dev-attached)
 return IRQ_NONE;



Actually, the first thing the interrupt does is read the status 
register, which should indicate that the device is not asserting a reset 
since the hardware has just been initialized by ni6527_reset() to 
disable and clear interrupts.


So it should be safe.  It may still be worth checking one of 
dev-attached or dev-read_subdev for additional safety.


--
-=( Ian Abbott @ MEV Ltd.E-mail: abbo...@mev.co.uk)=-
-=( Tel: +44 (0)161 477 1898   FAX: +44 (0)161 718 3587 )=-
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 1/2] hyperv-fb: add pci stub

2013-10-02 Thread Gerd Hoffmann
This patch adds a pci stub driver to hyper-fb.  The hyperv framebuffer
driver will bind to the pci device then, so linux kernel and userspace
know there is a proper kernel driver for the device active.  lspci shows
this for example:

[root@dhcp231 ~]# lspci -vs8
00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual
VGA (prog-if 00 [VGA controller])
Flags: bus master, fast devsel, latency 0, IRQ 11
Memory at f800 (32-bit, non-prefetchable) [size=64M]
Expansion ROM at unassigned [disabled]
Kernel driver in use: hyperv_fb

Another effect is that the xorg vesa driver will not attach to the
device and thus the Xorg server will automatically use the fbdev
driver instead.

Signed-off-by: Gerd Hoffmann kra...@redhat.com
---
 drivers/video/hyperv_fb.c | 40 +++-
 1 file changed, 39 insertions(+), 1 deletion(-)

diff --git a/drivers/video/hyperv_fb.c b/drivers/video/hyperv_fb.c
index 8ac99b8..8d456dc 100644
--- a/drivers/video/hyperv_fb.c
+++ b/drivers/video/hyperv_fb.c
@@ -795,12 +795,21 @@ static int hvfb_remove(struct hv_device *hdev)
 }
 
 
+static DEFINE_PCI_DEVICE_TABLE(pci_stub_id_table) = {
+   {
+   .vendor  = PCI_VENDOR_ID_MICROSOFT,
+   .device  = PCI_DEVICE_ID_HYPERV_VIDEO,
+   },
+   { /* end of list */ }
+};
+
 static const struct hv_vmbus_device_id id_table[] = {
/* Synthetic Video Device GUID */
{HV_SYNTHVID_GUID},
{}
 };
 
+MODULE_DEVICE_TABLE(pci, pci_stub_id_table);
 MODULE_DEVICE_TABLE(vmbus, id_table);
 
 static struct hv_driver hvfb_drv = {
@@ -810,14 +819,43 @@ static struct hv_driver hvfb_drv = {
.remove = hvfb_remove,
 };
 
+static int hvfb_pci_stub_probe(struct pci_dev *pdev,
+  const struct pci_device_id *ent)
+{
+   return 0;
+}
+
+static void hvfb_pci_stub_remove(struct pci_dev *pdev)
+{
+}
+
+static struct pci_driver hvfb_pci_stub_driver = {
+   .name = KBUILD_MODNAME,
+   .id_table = pci_stub_id_table,
+   .probe =hvfb_pci_stub_probe,
+   .remove =   hvfb_pci_stub_remove,
+};
 
 static int __init hvfb_drv_init(void)
 {
-   return vmbus_driver_register(hvfb_drv);
+   int ret;
+
+   ret = vmbus_driver_register(hvfb_drv);
+   if (ret != 0)
+   return ret;
+
+   ret = pci_register_driver(hvfb_pci_stub_driver);
+   if (ret != 0) {
+   vmbus_driver_unregister(hvfb_drv);
+   return ret;
+   }
+
+   return 0;
 }
 
 static void __exit hvfb_drv_exit(void)
 {
+   pci_unregister_driver(hvfb_pci_stub_driver);
vmbus_driver_unregister(hvfb_drv);
 }
 
-- 
1.8.3.1

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH] staging: comedi: ni_65xx: (bug fix) confine insn_bits to one subdevice

2013-10-02 Thread Ian Abbott
The `insn_bits` handler `ni_65xx_dio_insn_bits()` has a `for` loop that
currently writes (optionally) and reads back up to 5 ports consisting
of 8 channels each.  It reads up to 32 1-bit channels but can only read
and write a whole port at once - it needs to handle up to 5 ports as the
first channel it reads might not be aligned on a port boundary.  It
breaks out of the loop early if the next port it handles is beyond the
final port on the card.  It also breaks out early on the 5th port in the
loop if the first channel was aligned.  Unfortunately, it doesn't check
that the current port it is dealing with belongs to the comedi subdevice
the `insn_bits` handler is acting on.  That's a bug.

Redo the `for` loop to terminate after the final port belonging to the
subdevice, changing the loop variable in the process to simplify things
a bit.  The `for` loop could now try and handle more than 5 ports if the
subdevice has more than 40 channels, but the test `if (bitshift = 32)`
ensures it will break out early after 4 or 5 ports (depending on whether
the first channel is aligned on a port boundary).  (`bitshift` will be
between -7 and 7 inclusive on the first iteration, increasing by 8 for
each subsequent operation.)

Signed-off-by: Ian Abbott abbo...@mev.co.uk
Cc: sta...@vger.kernel.org # 3.10.y 3.11.y 3.12.y
---
Needs backporting for longterm kernels before 3.10.y
---
 drivers/staging/comedi/drivers/ni_65xx.c | 25 ++---
 1 file changed, 10 insertions(+), 15 deletions(-)

diff --git a/drivers/staging/comedi/drivers/ni_65xx.c 
b/drivers/staging/comedi/drivers/ni_65xx.c
index 3ba4c57..853f62b 100644
--- a/drivers/staging/comedi/drivers/ni_65xx.c
+++ b/drivers/staging/comedi/drivers/ni_65xx.c
@@ -369,28 +369,23 @@ static int ni_65xx_dio_insn_bits(struct comedi_device 
*dev,
 {
const struct ni_65xx_board *board = comedi_board(dev);
struct ni_65xx_private *devpriv = dev-private;
-   unsigned base_bitfield_channel;
-   const unsigned max_ports_per_bitfield = 5;
+   int base_bitfield_channel;
unsigned read_bits = 0;
-   unsigned j;
+   int last_port_offset = ni_65xx_port_by_channel(s-n_chan - 1);
+   int port_offset;
 
base_bitfield_channel = CR_CHAN(insn-chanspec);
-   for (j = 0; j  max_ports_per_bitfield; ++j) {
-   const unsigned port_offset =
-   ni_65xx_port_by_channel(base_bitfield_channel) + j;
-   const unsigned port =
-   sprivate(s)-base_port + port_offset;
-   unsigned base_port_channel;
+   for (port_offset = ni_65xx_port_by_channel(base_bitfield_channel);
+port_offset = last_port_offset; port_offset++) {
+   unsigned port = sprivate(s)-base_port + port_offset;
+   int base_port_channel = port_offset * ni_65xx_channels_per_port;
unsigned port_mask, port_data, port_read_bits;
-   int bitshift;
-   if (port = ni_65xx_total_num_ports(board))
+   int bitshift = base_port_channel - base_bitfield_channel;
+
+   if (bitshift = 32)
break;
-   base_port_channel = port_offset * ni_65xx_channels_per_port;
port_mask = data[0];
port_data = data[1];
-   bitshift = base_port_channel - base_bitfield_channel;
-   if (bitshift = 32 || bitshift = -32)
-   break;
if (bitshift  0) {
port_mask = bitshift;
port_data = bitshift;
-- 
1.8.3.2

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 1/2] hyperv-fb: add pci stub

2013-10-02 Thread KY Srinivasan


 -Original Message-
 From: Gerd Hoffmann [mailto:kra...@redhat.com]
 Sent: Wednesday, October 02, 2013 4:55 AM
 Cc: Gerd Hoffmann; KY Srinivasan; Haiyang Zhang; Jean-Christophe Plagniol-
 Villard; Tomi Valkeinen; open list:Hyper-V CORE AND...; open list:FRAMEBUFFER
 LAYER; open list
 Subject: [PATCH 1/2] hyperv-fb: add pci stub
 
 This patch adds a pci stub driver to hyper-fb.  The hyperv framebuffer
 driver will bind to the pci device then, so linux kernel and userspace
 know there is a proper kernel driver for the device active.  lspci shows
 this for example:
 
 [root@dhcp231 ~]# lspci -vs8
 00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual
 VGA (prog-if 00 [VGA controller])
 Flags: bus master, fast devsel, latency 0, IRQ 11
 Memory at f800 (32-bit, non-prefetchable) [size=64M]
 Expansion ROM at unassigned [disabled]
 Kernel driver in use: hyperv_fb
 
 Another effect is that the xorg vesa driver will not attach to the
 device and thus the Xorg server will automatically use the fbdev
 driver instead.
 
 Signed-off-by: Gerd Hoffmann kra...@redhat.com
 ---
  drivers/video/hyperv_fb.c | 40
 +++-
  1 file changed, 39 insertions(+), 1 deletion(-)
 
 diff --git a/drivers/video/hyperv_fb.c b/drivers/video/hyperv_fb.c
 index 8ac99b8..8d456dc 100644
 --- a/drivers/video/hyperv_fb.c
 +++ b/drivers/video/hyperv_fb.c
 @@ -795,12 +795,21 @@ static int hvfb_remove(struct hv_device *hdev)
  }
 
 
 +static DEFINE_PCI_DEVICE_TABLE(pci_stub_id_table) = {
 + {
 + .vendor  = PCI_VENDOR_ID_MICROSOFT,
 + .device  = PCI_DEVICE_ID_HYPERV_VIDEO,
 + },
 + { /* end of list */ }
 +};
 +
  static const struct hv_vmbus_device_id id_table[] = {
   /* Synthetic Video Device GUID */
   {HV_SYNTHVID_GUID},
   {}
  };
 
 +MODULE_DEVICE_TABLE(pci, pci_stub_id_table);
  MODULE_DEVICE_TABLE(vmbus, id_table);
 
  static struct hv_driver hvfb_drv = {
 @@ -810,14 +819,43 @@ static struct hv_driver hvfb_drv = {
   .remove = hvfb_remove,
  };
 
 +static int hvfb_pci_stub_probe(struct pci_dev *pdev,
 +const struct pci_device_id *ent)
 +{
 + return 0;
 +}
 +
 +static void hvfb_pci_stub_remove(struct pci_dev *pdev)
 +{
 +}
 +
 +static struct pci_driver hvfb_pci_stub_driver = {
 + .name = KBUILD_MODNAME,
 + .id_table = pci_stub_id_table,
 + .probe =hvfb_pci_stub_probe,
 + .remove =   hvfb_pci_stub_remove,
 +};
 
  static int __init hvfb_drv_init(void)
  {
 - return vmbus_driver_register(hvfb_drv);
 + int ret;
 +
 + ret = vmbus_driver_register(hvfb_drv);
 + if (ret != 0)
 + return ret;
 +
 + ret = pci_register_driver(hvfb_pci_stub_driver);
 + if (ret != 0) {
 + vmbus_driver_unregister(hvfb_drv);
 + return ret;
 + }
 +
 + return 0;
  }
 
  static void __exit hvfb_drv_exit(void)
  {
 + pci_unregister_driver(hvfb_pci_stub_driver);
   vmbus_driver_unregister(hvfb_drv);
  }
 
 --
 1.8.3.1
Gerd,

Thanks for doing this. This certainly will address some of the issues that are 
reported. I do have a question though - how would this work if we don't have 
PCI bus in the guest.

Regards,

K. Y
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: Drivers: scsi: FLUSH timeout

2013-10-02 Thread KY Srinivasan


 -Original Message-
 From: geert.uytterhoe...@gmail.com [mailto:geert.uytterhoe...@gmail.com]
 On Behalf Of Geert Uytterhoeven
 Sent: Wednesday, September 25, 2013 1:40 AM
 To: KY Srinivasan
 Cc: Mike Christie; Jack Wang; Greg KH; linux-ker...@vger.kernel.org;
 de...@linuxdriverproject.org; oher...@suse.com; jbottom...@parallels.com;
 h...@infradead.org; linux-s...@vger.kernel.org
 Subject: Re: Drivers: scsi: FLUSH timeout
 
 On Tue, Sep 24, 2013 at 11:53 PM, KY Srinivasan k...@microsoft.com wrote:
  I am not sure how that magic number was arrived at (the 60HZ number). We
 want this to be little higher -
 
 60 * HZ means 60 seconds.
 
  would there be any issues raising this to say  180 seconds. This is the 
  value we
 currently have for I/O
  timeout.
 
 So you want to replace it by 180 * HZ, which is ... another magic number?

Ideally, I want this to be adjustable like the way we can change the I/O 
timeout.
Since that has been attempted earlier and rejected (not clear what the reasons 
were),
I was suggesting that we pick a larger number. James, let me know how I should 
proceed here.

Regards,

K. Y
 
 Gr{oetje,eeting}s,
 
 Geert
 
 --
 Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- 
 ge...@linux-m68k.org
 
 In personal conversations with technical people, I call myself a hacker. But
 when I'm talking to journalists I just say programmer or something like 
 that.
 -- Linus Torvalds
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: MTD: Micron SPINAND Driver support

2013-10-02 Thread Brian Norris
On Tue, Oct 01, 2013 at 03:03:58PM +0530, Kamlakant Patel wrote:
 This patch adds support for Micron SPINAND via MTD.
 
 Signed-off-by: Mona Anonuevo manonu...@micron.com
 Signed-off-by: Kamlakant Patel kamlakant.pa...@broadcom.com
 ---
 This patch has to be merged via staging tree.
   
 This is a driver from Micron for MT29F1G01ZACH4 SPI based NAND chips. This 
 driver had
 been posted multiple times to the mtd list.
 1. http://lists.infradead.org/pipermail/linux-mtd/2010-May/031975.html
 2. http://lists.infradead.org/pipermail/linux-mtd/2010-April/029523.html
 3. patchwork.ozlabs.org/patch/258697/
 This has not been merged into the main kernel yet.
 
 I have cleaned and updated it for current kernel. Since there are many users 
 for
 this driver, it may be useful to add it to the staging tree, where further 
 fixes and
 cleanups can be done. Once it reaches to the standard will be moved to the 
 mtd.
 
 This driver has been tested with Micron SPINAND MT29F1G01ZACH4 chip on kernel 
 3.12 on
 the Netlogic XLP platforms.
  
 Mona Anonuevo, I have retained your sign-offs from the original patch.
 
 v1:
 * Added MTD_SPINAND_MT29F and MTD_NAND dependencies to avoid build errors.
 * Some more code cleanup.
 
  drivers/staging/Kconfig   |   2 +
  drivers/staging/Makefile  |   1 +
  drivers/staging/mt29f_spinand/Kconfig |  16 +
  drivers/staging/mt29f_spinand/Makefile|   1 +
  drivers/staging/mt29f_spinand/TODO|  13 +
  drivers/staging/mt29f_spinand/mt29f_spinand.c | 962 
 ++
  drivers/staging/mt29f_spinand/mt29f_spinand.h | 107 +++
  7 files changed, 1102 insertions(+)
  create mode 100644 drivers/staging/mt29f_spinand/Kconfig
  create mode 100644 drivers/staging/mt29f_spinand/Makefile
  create mode 100644 drivers/staging/mt29f_spinand/TODO
  create mode 100644 drivers/staging/mt29f_spinand/mt29f_spinand.c
  create mode 100644 drivers/staging/mt29f_spinand/mt29f_spinand.h

...

 diff --git a/drivers/staging/mt29f_spinand/mt29f_spinand.c 
 b/drivers/staging/mt29f_spinand/mt29f_spinand.c
 new file mode 100644
 index 000..8e95a57
 --- /dev/null
 +++ b/drivers/staging/mt29f_spinand/mt29f_spinand.c
 @@ -0,0 +1,962 @@

...

 +#define MAX_WAIT_JIFFIES  (40 * HZ)
 +static int wait_till_ready(struct spi_device *spi_nand)
 +{
 + unsigned long deadline;
 + int retval;
 + u8 stat = 0;
 +
 + deadline = jiffies + MAX_WAIT_JIFFIES;
 + do {
 + retval = spinand_read_status(spi_nand, stat);
 + if (retval  0)
 + return -1;

You might want to look at using proper error codes here.

 + else if (!(stat  0x1))
 + break;
 +
 + cond_resched();
 + } while (!time_after_eq(jiffies, deadline));
 +
 + if ((stat  0x1) == 0)
 + return 0;
 +
 + return -1;

Same.

 +}

...

 +static int spinand_wait(struct mtd_info *mtd, struct nand_chip *chip)
 +{
 + struct spinand_info *info = (struct spinand_info *)chip-priv;
 +
 + unsigned long timeo = jiffies;
 + int retval, state = chip-state;
 + u8 status;
 +
 + if (state == FL_ERASING)
 + timeo += (HZ * 400) / 1000;
 + else
 + timeo += (HZ * 20) / 1000;

msecs_to_jiffies()?

 +
 + while (time_before(jiffies, timeo)) {
 + retval = spinand_read_status(info-spi, status);
 + if ((status  STATUS_OIP_MASK) == STATUS_READY)
 + return 0;
 +
 + cond_resched();
 + }
 + return 0;
 +}
 +

You can address these comments in follow up patches after it's included
in staging, though. There's probably more review needed anyway
eventually (I see that no one really has reviewed this on the MTD
mailing list yet).

Brian
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 1/2] hyperv-fb: add pci stub

2013-10-02 Thread Haiyang Zhang


 -Original Message-
 From: linux-fbdev-ow...@vger.kernel.org [mailto:linux-fbdev-
 ow...@vger.kernel.org] On Behalf Of Gerd Hoffmann
 Sent: Wednesday, October 2, 2013 7:55 AM
 Cc: Gerd Hoffmann; KY Srinivasan; Haiyang Zhang; Jean-Christophe Plagniol-
 Villard; Tomi Valkeinen; open list:Hyper-V CORE AND...; open
 list:FRAMEBUFFER LAYER; open list
 Subject: [PATCH 1/2] hyperv-fb: add pci stub
 
 This patch adds a pci stub driver to hyper-fb.  The hyperv framebuffer driver
 will bind to the pci device then, so linux kernel and userspace know there is 
 a
 proper kernel driver for the device active.  lspci shows this for example:
 
 [root@dhcp231 ~]# lspci -vs8
 00:08.0 VGA compatible controller: Microsoft Corporation Hyper-V virtual
 VGA (prog-if 00 [VGA controller])
 Flags: bus master, fast devsel, latency 0, IRQ 11
 Memory at f800 (32-bit, non-prefetchable) [size=64M]
 Expansion ROM at unassigned [disabled]
 Kernel driver in use: hyperv_fb
 
 Another effect is that the xorg vesa driver will not attach to the device and
 thus the Xorg server will automatically use the fbdev driver instead.
 
 Signed-off-by: Gerd Hoffmann kra...@redhat.com

Acked-by: Haiyang Zhang haiya...@microsoft.com

Thank you for fixing this!

- Haiyang


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/3] ARM: dts: imx6qdl-sabresd: Add HDMI support

2013-10-02 Thread Fabio Estevam
Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx6qdl-sabresd.dtsi | 14 ++
 1 file changed, 14 insertions(+)

diff --git a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi 
b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
index 64e454b..55f261c 100644
--- a/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-sabresd.dtsi
@@ -243,3 +243,17 @@
wp-gpios = gpio2 1 0;
status = okay;
 };
+
+
+i2c2 {
+   clock-frequency = 10;
+   pinctrl-names = default;
+   pinctrl-0 = pinctrl_i2c2_2;
+   status = okay;
+};
+
+hdmi {
+   ddc = i2c2;
+   status = okay;
+};
+
-- 
1.8.1.2


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 2/3] ARM: dts: imx6qdl-wandboard: Add HDMI support

2013-10-02 Thread Fabio Estevam
Signed-off-by: Fabio Estevam fabio.este...@freescale.com
---
 arch/arm/boot/dts/imx6dl.dtsi|  4 
 arch/arm/boot/dts/imx6q.dtsi |  4 
 arch/arm/boot/dts/imx6qdl-wandboard.dtsi | 13 +
 arch/arm/boot/dts/imx6qdl.dtsi   | 10 ++
 4 files changed, 31 insertions(+)

diff --git a/arch/arm/boot/dts/imx6dl.dtsi b/arch/arm/boot/dts/imx6dl.dtsi
index 9e8ae11..65e54b4 100644
--- a/arch/arm/boot/dts/imx6dl.dtsi
+++ b/arch/arm/boot/dts/imx6dl.dtsi
@@ -88,3 +88,7 @@
crtcs = ipu1 0, ipu1 1;
};
 };
+
+hdmi {
+   crtcs = ipu1 0, ipu1 1;
+}
diff --git a/arch/arm/boot/dts/imx6q.dtsi b/arch/arm/boot/dts/imx6q.dtsi
index f024ef2..d2467f5 100644
--- a/arch/arm/boot/dts/imx6q.dtsi
+++ b/arch/arm/boot/dts/imx6q.dtsi
@@ -159,3 +159,7 @@
crtcs = ipu1 0, ipu1 1, ipu2 0, ipu2 1;
};
 };
+
+hdmi {
+   crtcs = ipu1 0, ipu1 1, ipu2 0, ipu2 1;
+};
diff --git a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi 
b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
index df42d3c..624a9ce 100644
--- a/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
+++ b/arch/arm/boot/dts/imx6qdl-wandboard.dtsi
@@ -58,6 +58,19 @@
status = okay;
 };
 
+
+hdmi {
+   ddc = i2c1;
+   status = okay;
+};
+
+i2c1 {
+   clock-frequency = 10;
+   pinctrl-names = default;
+   pinctrl-0 = pinctrl_i2c1_1;
+   status = okay;
+};
+
 i2c2 {
clock-frequency = 10;
pinctrl-names = default;
diff --git a/arch/arm/boot/dts/imx6qdl.dtsi b/arch/arm/boot/dts/imx6qdl.dtsi
index ef51342..df54505 100644
--- a/arch/arm/boot/dts/imx6qdl.dtsi
+++ b/arch/arm/boot/dts/imx6qdl.dtsi
@@ -1352,6 +1352,16 @@
};
};
 
+   hdmi: hdmi@012 {
+   compatible = fsl,imx6q-hdmi;
+   reg = 0x0012 0x9000;
+   interrupts = 0 115 0x04;
+   gpr = gpr;
+   clocks = clks 123, clks 124;
+   clock-names = iahb, isfr;
+   status = disabled;
+   };
+
dcic1: dcic@020e4000 {
reg = 0x020e4000 0x4000;
interrupts = 0 124 0x04;
-- 
1.8.1.2


___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH 2/2] hyperv-fb: add blanking support

2013-10-02 Thread Haiyang Zhang
 -Original Message-
 From: linux-fbdev-ow...@vger.kernel.org [mailto:linux-fbdev-
 ow...@vger.kernel.org] On Behalf Of Gerd Hoffmann
 Sent: Wednesday, October 2, 2013 7:55 AM
 Cc: Gerd Hoffmann; KY Srinivasan; Haiyang Zhang; Jean-Christophe Plagniol-
 Villard; Tomi Valkeinen; open list:Hyper-V CORE AND...; open
 list:FRAMEBUFFER LAYER; open list
 Subject: [PATCH 2/2] hyperv-fb: add blanking support
 
 Signed-off-by: Gerd Hoffmann kra...@redhat.com

Acked-by: Haiyang Zhang haiya...@microsoft.com

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 0/6] OMAP4 ISS driver

2013-10-02 Thread Laurent Pinchart
Hello,

The OMAP4 ISS driver has lived out of tree for more than two years now. This
situation is both sad and resource-wasting, as the driver has been used (and
thus) hacked since then with nowhere to send patches to. Time has come to fix
the problem.

As the code is mostly, but not quite ready for prime time, I'd like to request
its addition to drivers/staging/. I've added a (pretty small) TODO file and I
commit to cleaning up the code and get it to drivers/media/ where it belongs.

I've split the driver in six patches to avoid getting caught in vger's size
and to make review slightly easier. Sergio Aguirre is the driver author (huge
thanks for that!), I've thus kept his authorship on patches 1/6 to 5/6.

I don't have much else to add here, let's get this beast to mainline and allow
other developers to use the driver and contribute patches.

Laurent Pinchart (1):
  v4l: omap4iss: Add support for OMAP4 camera interface - Build system

Sergio Aguirre (5):
  v4l: omap4iss: Add support for OMAP4 camera interface - Core
  v4l: omap4iss: Add support for OMAP4 camera interface - Video devices
  v4l: omap4iss: Add support for OMAP4 camera interface - CSI receivers
  v4l: omap4iss: Add support for OMAP4 camera interface - IPIPE(IF)
  v4l: omap4iss: Add support for OMAP4 camera interface - Resizer

 Documentation/video4linux/omap4_camera.txt   |   63 ++
 drivers/staging/media/Kconfig|2 +
 drivers/staging/media/Makefile   |1 +
 drivers/staging/media/omap4iss/Kconfig   |   12 +
 drivers/staging/media/omap4iss/Makefile  |6 +
 drivers/staging/media/omap4iss/TODO  |4 +
 drivers/staging/media/omap4iss/iss.c | 1477 ++
 drivers/staging/media/omap4iss/iss.h |  153 +++
 drivers/staging/media/omap4iss/iss_csi2.c| 1368 
 drivers/staging/media/omap4iss/iss_csi2.h|  156 +++
 drivers/staging/media/omap4iss/iss_csiphy.c  |  278 +
 drivers/staging/media/omap4iss/iss_csiphy.h  |   51 +
 drivers/staging/media/omap4iss/iss_ipipe.c   |  581 ++
 drivers/staging/media/omap4iss/iss_ipipe.h   |   67 ++
 drivers/staging/media/omap4iss/iss_ipipeif.c |  847 +++
 drivers/staging/media/omap4iss/iss_ipipeif.h |   92 ++
 drivers/staging/media/omap4iss/iss_regs.h|  883 +++
 drivers/staging/media/omap4iss/iss_resizer.c |  905 
 drivers/staging/media/omap4iss/iss_resizer.h |   75 ++
 drivers/staging/media/omap4iss/iss_video.c   | 1129 
 drivers/staging/media/omap4iss/iss_video.h   |  201 
 include/media/omap4iss.h |   65 ++
 22 files changed, 8416 insertions(+)
 create mode 100644 Documentation/video4linux/omap4_camera.txt
 create mode 100644 drivers/staging/media/omap4iss/Kconfig
 create mode 100644 drivers/staging/media/omap4iss/Makefile
 create mode 100644 drivers/staging/media/omap4iss/TODO
 create mode 100644 drivers/staging/media/omap4iss/iss.c
 create mode 100644 drivers/staging/media/omap4iss/iss.h
 create mode 100644 drivers/staging/media/omap4iss/iss_csi2.c
 create mode 100644 drivers/staging/media/omap4iss/iss_csi2.h
 create mode 100644 drivers/staging/media/omap4iss/iss_csiphy.c
 create mode 100644 drivers/staging/media/omap4iss/iss_csiphy.h
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipe.c
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipe.h
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipeif.c
 create mode 100644 drivers/staging/media/omap4iss/iss_ipipeif.h
 create mode 100644 drivers/staging/media/omap4iss/iss_regs.h
 create mode 100644 drivers/staging/media/omap4iss/iss_resizer.c
 create mode 100644 drivers/staging/media/omap4iss/iss_resizer.h
 create mode 100644 drivers/staging/media/omap4iss/iss_video.c
 create mode 100644 drivers/staging/media/omap4iss/iss_video.h
 create mode 100644 include/media/omap4iss.h

-- 
Regards,

Laurent Pinchart

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


[PATCH 3/6] v4l: omap4iss: Add support for OMAP4 camera interface - CSI receivers

2013-10-02 Thread Laurent Pinchart
From: Sergio Aguirre sergio.a.agui...@gmail.com

This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.

Check Documentation/video4linux/omap4_camera.txt for details.

This commit adds CSI receivers support.

Signed-off-by: Sergio Aguirre sergio.a.agui...@gmail.com

[Port the driver to v3.12-rc3, including the following changes
- Don't include plat/ headers
- Don't use cpu_is_omap44xx() macro
- Don't depend on EXPERIMENTAL
- Fix s_crop operation prototype
- Update link_notify prototype
- Rename media_entity_remote_source to media_entity_remote_pad]

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 drivers/staging/media/omap4iss/iss_csi2.c   | 1368 +++
 drivers/staging/media/omap4iss/iss_csi2.h   |  156 +++
 drivers/staging/media/omap4iss/iss_csiphy.c |  278 ++
 drivers/staging/media/omap4iss/iss_csiphy.h |   51 +
 4 files changed, 1853 insertions(+)
 create mode 100644 drivers/staging/media/omap4iss/iss_csi2.c
 create mode 100644 drivers/staging/media/omap4iss/iss_csi2.h
 create mode 100644 drivers/staging/media/omap4iss/iss_csiphy.c
 create mode 100644 drivers/staging/media/omap4iss/iss_csiphy.h

diff --git a/drivers/staging/media/omap4iss/iss_csi2.c 
b/drivers/staging/media/omap4iss/iss_csi2.c
new file mode 100644
index 000..0ee8381
--- /dev/null
+++ b/drivers/staging/media/omap4iss/iss_csi2.c
@@ -0,0 +1,1368 @@
+/*
+ * TI OMAP4 ISS V4L2 Driver - CSI PHY module
+ *
+ * Copyright (C) 2012 Texas Instruments, Inc.
+ *
+ * Author: Sergio Aguirre sergio.a.agui...@gmail.com
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ */
+
+#include linux/delay.h
+#include media/v4l2-common.h
+#include linux/v4l2-mediabus.h
+#include linux/mm.h
+
+#include iss.h
+#include iss_regs.h
+#include iss_csi2.h
+
+/*
+ * csi2_if_enable - Enable CSI2 Receiver interface.
+ * @enable: enable flag
+ *
+ */
+static void csi2_if_enable(struct iss_csi2_device *csi2, u8 enable)
+{
+   struct iss_csi2_ctrl_cfg *currctrl = csi2-ctrl;
+
+   writel((readl(csi2-regs1 + CSI2_CTRL)  ~CSI2_CTRL_IF_EN) |
+   (enable ? CSI2_CTRL_IF_EN : 0),
+   csi2-regs1 + CSI2_CTRL);
+
+   currctrl-if_enable = enable;
+}
+
+/*
+ * csi2_recv_config - CSI2 receiver module configuration.
+ * @currctrl: iss_csi2_ctrl_cfg structure
+ *
+ */
+static void csi2_recv_config(struct iss_csi2_device *csi2,
+struct iss_csi2_ctrl_cfg *currctrl)
+{
+   u32 reg = 0;
+
+   if (currctrl-frame_mode)
+   reg |= CSI2_CTRL_FRAME;
+   else
+   reg = ~CSI2_CTRL_FRAME;
+
+   if (currctrl-vp_clk_enable)
+   reg |= CSI2_CTRL_VP_CLK_EN;
+   else
+   reg = ~CSI2_CTRL_VP_CLK_EN;
+
+   if (currctrl-vp_only_enable)
+   reg |= CSI2_CTRL_VP_ONLY_EN;
+   else
+   reg = ~CSI2_CTRL_VP_ONLY_EN;
+
+   reg = ~CSI2_CTRL_VP_OUT_CTRL_MASK;
+   reg |= currctrl-vp_out_ctrl  CSI2_CTRL_VP_OUT_CTRL_SHIFT;
+
+   if (currctrl-ecc_enable)
+   reg |= CSI2_CTRL_ECC_EN;
+   else
+   reg = ~CSI2_CTRL_ECC_EN;
+
+   /*
+* Set MFlag assertion boundaries to:
+* Low: 4/8 of FIFO size
+* High: 6/8 of FIFO size
+*/
+   reg = ~(CSI2_CTRL_MFLAG_LEVH_MASK | CSI2_CTRL_MFLAG_LEVL_MASK);
+   reg |= (2  CSI2_CTRL_MFLAG_LEVH_SHIFT) |
+  (4  CSI2_CTRL_MFLAG_LEVL_SHIFT);
+
+   /* Generation of 16x64-bit bursts (Recommended) */
+   reg |= CSI2_CTRL_BURST_SIZE_EXPAND;
+
+   /* Do Non-Posted writes (Recommended) */
+   reg |= CSI2_CTRL_NON_POSTED_WRITE;
+
+   /*
+* Enforce Little endian for all formats, including:
+* YUV4:2:2 8-bit and YUV4:2:0 Legacy
+*/
+   reg |= CSI2_CTRL_ENDIANNESS;
+
+   writel(reg, csi2-regs1 + CSI2_CTRL);
+}
+
+static const unsigned int csi2_input_fmts[] = {
+   V4L2_MBUS_FMT_SGRBG10_1X10,
+   V4L2_MBUS_FMT_SGRBG10_DPCM8_1X8,
+   V4L2_MBUS_FMT_SRGGB10_1X10,
+   V4L2_MBUS_FMT_SRGGB10_DPCM8_1X8,
+   V4L2_MBUS_FMT_SBGGR10_1X10,
+   V4L2_MBUS_FMT_SBGGR10_DPCM8_1X8,
+   V4L2_MBUS_FMT_SGBRG10_1X10,
+   V4L2_MBUS_FMT_SGBRG10_DPCM8_1X8,
+   V4L2_MBUS_FMT_SBGGR8_1X8,
+   V4L2_MBUS_FMT_SGBRG8_1X8,
+   V4L2_MBUS_FMT_SGRBG8_1X8,
+   V4L2_MBUS_FMT_SRGGB8_1X8,
+   V4L2_MBUS_FMT_UYVY8_1X16,
+   V4L2_MBUS_FMT_YUYV8_1X16,
+};
+
+/* To set the format on the CSI2 requires a mapping function that takes
+ * the following inputs:
+ * - 3 different formats (at this time)
+ * - 2 destinations (mem, vp+mem) (vp only handled separately)
+ * - 2 decompression options (on, off)
+ * Output should be CSI2 frame format code
+ * Array indices as 

[PATCH 6/6] v4l: omap4iss: Add support for OMAP4 camera interface - Build system

2013-10-02 Thread Laurent Pinchart
This adds a very simplistic driver to utilize the CSI2A interface inside
the ISS subsystem in OMAP4, and dump the data to memory.

Check Documentation/video4linux/omap4_camera.txt for details.

This commit adds and updates Kconfig's and Makefile's, as well as a TODO
list.

Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com
---
 drivers/staging/media/Kconfig   |  2 ++
 drivers/staging/media/Makefile  |  1 +
 drivers/staging/media/omap4iss/Kconfig  | 12 
 drivers/staging/media/omap4iss/Makefile |  6 ++
 drivers/staging/media/omap4iss/TODO |  4 
 5 files changed, 25 insertions(+)
 create mode 100644 drivers/staging/media/omap4iss/Kconfig
 create mode 100644 drivers/staging/media/omap4iss/Makefile
 create mode 100644 drivers/staging/media/omap4iss/TODO

diff --git a/drivers/staging/media/Kconfig b/drivers/staging/media/Kconfig
index 46f1e61..bc4c798 100644
--- a/drivers/staging/media/Kconfig
+++ b/drivers/staging/media/Kconfig
@@ -33,6 +33,8 @@ source drivers/staging/media/msi3101/Kconfig
 
 source drivers/staging/media/solo6x10/Kconfig
 
+source drivers/staging/media/omap4iss/Kconfig
+
 # Keep LIRC at the end, as it has sub-menus
 source drivers/staging/media/lirc/Kconfig
 
diff --git a/drivers/staging/media/Makefile b/drivers/staging/media/Makefile
index eb7f30b..a528d3f 100644
--- a/drivers/staging/media/Makefile
+++ b/drivers/staging/media/Makefile
@@ -6,3 +6,4 @@ obj-$(CONFIG_VIDEO_DT3155)  += dt3155v4l/
 obj-$(CONFIG_VIDEO_GO7007) += go7007/
 obj-$(CONFIG_USB_MSI3101)  += msi3101/
 obj-$(CONFIG_VIDEO_DM365_VPFE) += davinci_vpfe/
+obj-$(CONFIG_VIDEO_OMAP4)  += omap4iss/
diff --git a/drivers/staging/media/omap4iss/Kconfig 
b/drivers/staging/media/omap4iss/Kconfig
new file mode 100644
index 000..b9fe753
--- /dev/null
+++ b/drivers/staging/media/omap4iss/Kconfig
@@ -0,0 +1,12 @@
+config VIDEO_OMAP4
+   bool OMAP 4 Camera support
+   depends on VIDEO_V4L2  VIDEO_V4L2_SUBDEV_API  I2C  ARCH_OMAP4
+   select VIDEOBUF2_DMA_CONTIG
+   ---help---
+ Driver for an OMAP 4 ISS controller.
+
+config VIDEO_OMAP4_DEBUG
+   bool OMAP 4 Camera debug messages
+   depends on VIDEO_OMAP4
+   ---help---
+ Enable debug messages on OMAP 4 ISS controller driver.
diff --git a/drivers/staging/media/omap4iss/Makefile 
b/drivers/staging/media/omap4iss/Makefile
new file mode 100644
index 000..a716ce9
--- /dev/null
+++ b/drivers/staging/media/omap4iss/Makefile
@@ -0,0 +1,6 @@
+# Makefile for OMAP4 ISS driver
+
+omap4-iss-objs += \
+   iss.o iss_csi2.o iss_csiphy.o iss_ipipeif.o iss_ipipe.o iss_resizer.o 
iss_video.o
+
+obj-$(CONFIG_VIDEO_OMAP4) += omap4-iss.o
diff --git a/drivers/staging/media/omap4iss/TODO 
b/drivers/staging/media/omap4iss/TODO
new file mode 100644
index 000..fcde888
--- /dev/null
+++ b/drivers/staging/media/omap4iss/TODO
@@ -0,0 +1,4 @@
+* Make the driver compile as a module
+* Fix FIFO/buffer overflows and underflows
+* Replace dummy resizer code with a real implementation
+* Fix checkpatch errors and warnings
-- 
1.8.1.5

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH] staging: dwc2: Make dwc2_hw_params.host_channels large enough

2013-10-02 Thread Paul Zimmerman
 From: Matthijs Kooijman [mailto:matth...@stdin.nl]
 Sent: Tuesday, October 01, 2013 2:43 PM
 
 The hardware offers a 4-bit register containing the number of host
 channels. However, the values of these register mean 1-16 host channels,
 not 0-15. Since the dwc2_hw_params struct stores the actual number of
 host channels supported instead of the raw register value, it should be
 5 bits wide instead of 4.
 
 Before this commit, hardware with 16 host channels would overflow the
 field, making it appear as 0 channels.
 
 This bug was introduced in commit 9badec2 (staging: dwc2: interpret all
 hwcfg and related register at init time).
 
 Reported-by: Dinh Nguyen dinh.li...@gmail.com
 Signed-off-by: Matthijs Kooijman matth...@stdin.nl
 ---
  drivers/staging/dwc2/core.h | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/drivers/staging/dwc2/core.h b/drivers/staging/dwc2/core.h
 index f7ba34b..fab718d 100644
 --- a/drivers/staging/dwc2/core.h
 +++ b/drivers/staging/dwc2/core.h
 @@ -294,7 +294,7 @@ struct dwc2_hw_params {
   unsigned dev_token_q_depth:5;
   unsigned max_transfer_size:26;
   unsigned max_packet_count:11;
 - unsigned host_channels:4;
 + unsigned host_channels:5;
   unsigned hs_phy_type:2;
   unsigned fs_phy_type:2;
   unsigned i2c_enable:1;
 --

Acked-by: Paul Zimmerman pa...@synopsys.com

By the way, it looks like 'num_dev_ep' would have the same problem,
except it is not used because we don't support device mode yet.
That one and also 'num_dev_perio_in_ep' and 'dev_token_q_depth' should
be removed, I think.

-- 
Paul

___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: MTD: Micron SPINAND Driver support

2013-10-02 Thread Greg KH
On Tue, Oct 01, 2013 at 03:03:58PM +0530, Kamlakant Patel wrote:
 
  drivers/staging/Kconfig   |   2 +
  drivers/staging/Makefile  |   1 +
  drivers/staging/mt29f_spinand/Kconfig |  16 +
  drivers/staging/mt29f_spinand/Makefile|   1 +
  drivers/staging/mt29f_spinand/TODO|  13 +
  drivers/staging/mt29f_spinand/mt29f_spinand.c | 962 
 ++
  drivers/staging/mt29f_spinand/mt29f_spinand.h | 107 +++

Why do you need a separate .h file for a single driver?

It's not a reason to reject this, just curious if it's that way for a
reason.  I'll look at this closer tomorrow and apply it if it passes my
minor amount of build testing.

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


Re: [PATCH] Staging: MTD: Micron SPINAND Driver support

2013-10-02 Thread Greg KH
On Tue, Oct 01, 2013 at 03:03:58PM +0530, Kamlakant Patel wrote:
 --- a/drivers/staging/Kconfig
 +++ b/drivers/staging/Kconfig
 @@ -136,6 +136,8 @@ source drivers/staging/goldfish/Kconfig
  
  source drivers/staging/netlogic/Kconfig
  
 +source drivers/staging/mt29f_spinand/Kconfig
 +

Any reason you don't put it at the end of the file, and need it here in
the middle?

thanks,

greg k-h
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel


RE: [PATCH] Staging: MTD: Micron SPINAND Driver support

2013-10-02 Thread Gupta, Pekon
 From: linux-mtd  On Behalf Of Brian Norris
  On Tue, Oct 01, 2013 at 03:03:58PM +0530, Kamlakant Patel wrote:
  This patch adds support for Micron SPINAND via MTD.
 
  Signed-off-by: Mona Anonuevo manonu...@micron.com
  Signed-off-by: Kamlakant Patel kamlakant.pa...@broadcom.com
  ---
  This patch has to be merged via staging tree.
 
  This is a driver from Micron for MT29F1G01ZACH4 SPI based NAND chips.
 This driver had
  been posted multiple times to the mtd list.
  1. http://lists.infradead.org/pipermail/linux-mtd/2010-May/031975.html
  2. http://lists.infradead.org/pipermail/linux-mtd/2010-April/029523.html
  3. patchwork.ozlabs.org/patch/258697/
  This has not been merged into the main kernel yet.
 
  I have cleaned and updated it for current kernel. Since there are many
 users for
  this driver, it may be useful to add it to the staging tree, where further 
  fixes
 and
  cleanups can be done. Once it reaches to the standard will be moved to the
 mtd.
 
  This driver has been tested with Micron SPINAND MT29F1G01ZACH4 chip
 on kernel 3.12 on
  the Netlogic XLP platforms.
 
  Mona Anonuevo, I have retained your sign-offs from the original patch.
 
I see that major portion (especially the generic framework) is ported from
http://lists.infradead.org/pipermail/linux-mtd/2010-May/031975.html
So shouldn't you just maintain the original authorship ?
And the original headers ?

 
 You can address these comments in follow up patches after it's included
 in staging, though. There's probably more review needed anyway
 eventually (I see that no one really has reviewed this on the MTD
 mailing list yet).
 
The original version of this patch in 2010 added *generic spinand*
framework. And support for m29f (Micron devices) should have been
added using that generic framework. But due to lack of response
generic framework never went in.
Therefore I think this patch series adds a customized driver just for
'm29f' (Micron serial NAND) devices, removing the generalization.

There was a refreshed version of original patch (with generic framework)
but no response on that too. I don't want to hold this patch, but it would
be good, if you can review generic framework also ..
https://lkml.org/lkml/2013/6/26/88


with regards, pekon
___
devel mailing list
de...@linuxdriverproject.org
http://driverdev.linuxdriverproject.org/mailman/listinfo/driverdev-devel