Re: [PATCH] USB: isp1760: allow platform devices to customize devflags

From: Mike Frysinger
Date: Tue Jun 23 2009 - 09:47:09 EST


On Tue, Jun 23, 2009 at 09:39, Ben Dooks wrote:
> On Tue, Jun 23, 2009 at 09:18:34AM -0400, Mike Frysinger wrote:
>> From: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
>>
>> Platform device support was merged earlier, but support for boards to
>> customize the devflags aspect of the controller was not. ÂWe want this on
>> Blackfin systems to control the bus width, but might as well expose all of
>> the fields while we're at it.
>>
>> Signed-off-by: Michael Hennerich <michael.hennerich@xxxxxxxxxx>
>> Signed-off-by: Bryan Wu <cooloney@xxxxxxxxxx>
>> Signed-off-by: Mike Frysinger <vapier@xxxxxxxxxx>
>> ---
>> Âdrivers/usb/host/isp1760-hcd.c | Â Â4 ++++
>> Âdrivers/usb/host/isp1760-hcd.h | Â Â2 ++
>> Âdrivers/usb/host/isp1760-if.c Â| Â 21 ++++++++++++++++++++-
>> Âinclude/linux/usb/isp1760.h  Â|  18 ++++++++++++++++++
>> Â4 files changed, 44 insertions(+), 1 deletions(-)
>> Âcreate mode 100644 include/linux/usb/isp1760.h
>>
>> diff --git a/drivers/usb/host/isp1760-hcd.c b/drivers/usb/host/isp1760-hcd.c
>> index 1543846..9600a58 100644
>> --- a/drivers/usb/host/isp1760-hcd.c
>> +++ b/drivers/usb/host/isp1760-hcd.c
>> @@ -386,6 +386,10 @@ static int isp1760_hc_setup(struct usb_hcd *hcd)
>> Â Â Â Â Â Â Â hwmode |= HW_DACK_POL_HIGH;
>> Â Â Â if (priv->devflags & ISP1760_FLAG_DREQ_POL_HIGH)
>> Â Â Â Â Â Â Â hwmode |= HW_DREQ_POL_HIGH;
>> + Â Â if (priv->devflags & ISP1760_FLAG_INTR_POL_HIGH)
>> + Â Â Â Â Â Â hwmode |= HW_INTR_HIGH_ACT;
>> + Â Â if (priv->devflags & ISP1760_FLAG_INTR_EDGE_TRIG)
>> + Â Â Â Â Â Â hwmode |= HW_INTR_EDGE_TRIG;
>
> better move these to the irq resource flags from the resource array
> in the platfrom device.

dont really know what you mean. the setup() function is shared
between multiple bus types (pci/platform/...), so the bits cant really
be pushed from the setup() to the platform resources ...
-mike
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/