USB: Ignore storage device in modem mode on DWN-652
D-Link DWN-652 in Modem mode exposes 3 interfaces
- First one is the USB storage one
- Second one is for both control and connection
- Third one is unknown
This patch avoids usb-storage trying to switch again when already in
modem mode, and exposes only 2 ttyUSB instead of 3 by not attaching
to the storage interface
USB: usbfs: deprecate and hide option for !embedded
Modern systems do not use usbfs; the entries within it are files,
not device nodes, and do not support ACLs which are the default way to
provide access to USB devices to untrusted users.
It is replaced by device-nodes maintained by udev in /dev/bus/usb,
libusb uses this device nodes.
Mark the option as deprecated, and hide entirely for non-embedded builds
(which may not be using udev but require raw USB device access).
Signed-off-by: Scott James Remnant <scott@canonical.com> Acked-by: Kay Sievers <kay.sievers@vrfy.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Alan Stern [Thu, 16 Apr 2009 19:35:09 +0000 (15:35 -0400)]
USB: consolidate usb_unbind_interface and usb_driver_release_interface
This patch (as1230) consolidates code in usb_unbind_interface() and
usb_driver_release_interface(). In fact, it makes release_interface
call unbind_interface, thereby removing the need for duplicated code.
It works like this: If the interface has already been registered with
the driver core when a driver releases it, then the usual driver-core
mechanism will call unbind_interface. If it hasn't been unregistered
then we will make the call ourselves.
As a nice bonus, drivers now don't have to worry about whether their
disconnect method will get called when they release an interface -- it
always will. Previously it would be called only if the interface was
registered.
Signed-off-by: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Added a function to set the packet size to be used based on the value from the
device endpoint descriptor. The FT2232H and FT4232H hi-speed devices will have
wMaxPacketSize of 512 bytes when connected to a USB 2.0 hi-speed host, but will
use alternative descriptors with wMaxPacketSize of 64 bytes if connected to a
USB 1.1 host or hub. All other FTDI devices have wMaxPacketSize of 64 bytes,
except some FT232R and FT245R devices which customers have mistakenly
programmed to have wMaxPacketSize of 0 - this is an error and will be
overridden to use wMaxPacketSize of 64 bytes. The packet size used is
important as it determines where the driver removes the status bytes from the
incoming data. If it is incorrect, it will lead to data corruption.
Signed-off-by: Mark J. Adamson <mark.adamson@ftdichip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Mark Adamson [Thu, 9 Apr 2009 14:03:09 +0000 (15:03 +0100)]
USB: serial: FTDI: add high speed device support
Added support for FTDI's USB 2.0 hi-speed devices - FT2232H (2
interfaces) and FT4232H (4 interfaces), including a new baud rate
calculation for these devices which can now achieve up to 12Mbaud by
turning off a divide by 2.5 in the baud rate generator of the chips. In
order to achieve baud rates of <1200 baud, the divide by 2.5 must be
active. The default product ID of the FT2232H is 0x6010 (same as the
FT2232C IC). The default PID of the FT4232H is 0x6011.
Signed-off-by: Mark J. Adamson <mark.adamson@ftdichip.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Tested on OMAP3 host side with Creative (Live! Cam Optia) USB camera
which uses high bandwidth isochronous IN endpoints. FIFO mode 4 is
updated to provide the needed 4K endpoint buffer without breaking
the g_nokia composite gadget configuration. (This is the only
gadget driver known to use enough endpoints to notice the change.)
Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
musb: use dma mode 1 for TX if transfer size equals maxpacket (v2)
Currently, with Inventra DMA, we use Mode 0 if transfer size is less
than or equal to the endpoint's maxpacket size. This requires that
we explicitly set TXPKTRDY for that transfer.
However the musb_g_tx code will not set TXPKTRDY twice if the last
transfer is exactly equal to maxpacket, even if request->zero is set.
Using Mode 1 will solve this; a better fix might be in musb_g_tx().
Without this change, musb will not correctly send out a ZLP if the
last transfer is the maxpacket size and request->zero is set.
David Brownell [Tue, 31 Mar 2009 19:35:09 +0000 (12:35 -0700)]
musb: support disconnect after HNP roleswitch
Adjust HNP state machines in MUSB driver so that they handle the
case where the cable is disconnected. The A-side machine was
very wrong (unrecoverable); the B-Side was much less so.
- A_PERIPHERAL ... as usual, the non-observability of the ID
pin through Mentor's registers makes trouble. We can't go
directly to A_WAIT_VFALL to end the session and start the
disconnect processing. We can however sense link suspending,
go to A_WAIT_BCON, and from there use OTG timeouts to finally
trigger that A_WAIT_VFALL transition. (Hoping that nobody
reconnects quickly to that port and notices the wrong state.)
- B_HOST ... actually clear the Host Request (HR) bit as the
messages say, disconnect the peripheral from the root hub,
and don't detour through a suspend state. (In some cases
this would eventually have cleaned up.)
Also adjust the A_SUSPEND transition to respect the A_AIDL_BDIS
timeout, so if HNP doesn't trigger quickly enough the A_WAIT_VFALL
transition happens as it should.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Thu, 2 Apr 2009 17:16:11 +0000 (10:16 -0700)]
musb: make initial HNP roleswitch work (v2)
Minor HNP bugfixes, so the initial role switch works:
- A-Device:
* disconnect-during-suspend enters A_PERIPHERAL state
* kill OTG timer after reset as A_PERIPHERAL ...
* ... and also pass that reset to the gadget
* once HNP succeeds, clear the "ignore_disconnect" flag
* from A_PERIPHERAL, disconnect transitions to A_WAIT_BCON
- B-Device:
* kill OTG timer on entry to B_HOST state (HNP succeeded)
* once HNP succeeds, clear "ignore_disconnect" flag
* kick the root hub only _after_ the state is adjusted
Other state transitions are left alone. Notably, exit paths from
the "roles have switched" state ... A_PERIPHERAL handling of that
stays seriously broken.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:32:12 +0000 (12:32 -0700)]
musb: otg timer cleanup
Minor cleanup of OTG timer handling:
* unify decls for OTG time constants, in the core header
* set up and use that timer in a more normal way
* move to the driver struct, so it's usable outside core
And tighten use and setup of T(a_wait_bcon) so that if it's used,
it's always valid. (If that timer expires, the A-device will
stop powering VBUS. For non-OTG systems, that will be a surprise.)
No behavioral changes, other than more consistency when applying
that core HNP timeout.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:30:04 +0000 (12:30 -0700)]
musb: proper hookup to transceiver drivers
Let the otg_transceiver in MUSB be managed by an external driver;
don't assume it's integrated. OMAP3 chips need it to be external,
and there may be ways to interact with the transceiver which add
functionality to the system.
Platform init code is responsible for setting up the transeciver,
probably using the NOP transceiver for integrated transceivers.
External ones will use whatever the board init code provided,
such as twl4030 or something more hands-off.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:28:31 +0000 (12:28 -0700)]
USB: nop-usb-xceiv: behave when linked as a module
The NOP OTG transceiver driver needs to be usable from modules.
Make sure its symbols are always accessible at both compile and
link time, and make sure the device instance is allocated from
the heap so that device lifetime rules are obeyed.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
David Brownell [Tue, 31 Mar 2009 19:26:10 +0000 (12:26 -0700)]
USB: twl4030-usb: fix minor reporting goofage
Fix a reporting glitch in the twl4030 USB transceiver code.
It wasn't properly distinguishing the two types of active
USB link: ID grounded, vs not. In the current code that
distinction doesn't much matter; in the future this bugfix
should help support better USB controller communications.
Provide a comment sorting out some of the cryptic bits of
the manual: different sections use different names for
key signals, and the register definitions don't help much
without the explanations and diagrams.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Fri, 27 Mar 2009 23:26:33 +0000 (00:26 +0100)]
USB: move orion-ehci's probe function to .devinit.text
A pointer to ehci_orion_drv_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Ronen Shitrit <rshitrit@marvell.com> Cc: Lennert Buytenhek <buytenh@marvell.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: David Brownell <david-b@pacbell.net> Cc: Nicolas Pitre <nico@marvell.com> Cc: Russell King <rmk+kernel@arm.linux.org.uk> Cc: Tzachi Perelstein <tzachi@marvell.com> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Fri, 27 Mar 2009 23:27:00 +0000 (00:27 +0100)]
USB: move r8a66597_hcd's probe function to .devinit.text
A pointer to r8a66597_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Cc: Magnus Damm <damm@igel.co.jp> Cc: Stephen Rothwell <sfr@canb.auug.org.au> Cc: Paul Mundt <lethal@linux-sh.org> Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Uwe Kleine-König [Fri, 27 Mar 2009 23:27:13 +0000 (00:27 +0100)]
USB: move twl4030_usb's probe function to .devinit.text
A pointer to twl4030_usb_probe is passed to the core via
platform_driver_register and so the function must not disappear when the
.init sections are discarded. Otherwise (if also having HOTPLUG=y)
unbinding and binding a device to the driver via sysfs will result in an
oops as does a device being registered late.
An alternative to this patch is using platform_driver_probe instead of
platform_driver_register plus removing the pointer to the probe function
from the struct platform_driver.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Cc: Jouni Hogander <jouni.hogander@nokia.com> Cc: Kalle Jokiniemi <kalle.jokiniemi@digia.com> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Tony Lindgren <tony@atomide.com> Cc: Kevin Hilman <khilman@deeprootsystems.com> Cc: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:59:46 +0000 (12:59 -0700)]
musb: split out CPPI interrupt handler
As DaVinci DM646x has a dedicated CPPI DMA interrupt, replace
cppi_completion() (which has always been kind of layering
violation) by a complete CPPI interrupt handler.
[ dbrownell@users.sourceforge.net: only cppi_dma.c needs platform
device header, not cppi_dma.h ]
Signed-off-by: Dmitry Krivoschekov <dkrivoschekov@ru.mvista.com> Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:58:31 +0000 (12:58 -0700)]
musb_host: refactor URB giveback
As musb_advance_schedule() is now the only remaning
caller of musb_giveback() (and the only valid context
of such call), just fold the latter into the former
and then rename __musb_giveback() into musb_giveback().
This is a net minor shrink.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:57:50 +0000 (12:57 -0700)]
musb_host: streamline musb_cleanup_urb() calls
The argument for the 'is_in' parameter of musb_cleanup_urb()
is always extracted from an URB that's passed to the function.
So that parameter is superfluous; remove it.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:56:26 +0000 (12:56 -0700)]
musb_host: simplify check for active URB
The existance of the scheduling list shouldn't matter in
determining whether there's currectly an URB executing on a
hardware endpoint. What should actually matter is the 'in_qh'
or 'out_qh' fields of the 'struct musb_hw_ep' -- those are
set in musb_start_urb() and cleared in musb_giveback() when
the endpoint's URB list drains. Hence we should be able to
replace the big *switch* statements in musb_urb_dequeue()
and musb_h_disable() with mere musb_ep_get_qh() calls...
While at it, do some more changes:
- add 'is_in' variable to musb_urb_dequeue();
- remove the unnecessary 'epnum' variable from musb_h_disable();
- fix the comment style in the vicinity.
This is a minor shrink of source and object code.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:55:16 +0000 (12:55 -0700)]
musb_host: factor out musb_ep_{get|set}_qh()
Factor out the often used code to get/set the active 'qh'
pointer for the hardware endpoint. Change the way the case
of a shared FIFO is handled by setting *both* 'in_qh' and
'out_qh' fields of 'struct musb_hw_ep'. That seems more
consistent and makes getting to the current 'qh' easy when
the code knows the direction beforehand.
While at it, turn some assignments into intializers and
fix declaration style in the vicinity.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:53:32 +0000 (12:53 -0700)]
musb_gadget: suppress "parasitic" TX interrupts with CPPI
Suppress "parasitic" endpoint interrupts in the DMA mode
when using CPPI DMA driver; they're caused by the MUSB gadget
driver using the DMA request mode 0 instead of the mode 1.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Sergei Shtylyov [Fri, 27 Mar 2009 19:52:43 +0000 (12:52 -0700)]
musb_gadget: fix unhandled endpoint 0 IRQs
The gadget EP0 code routinely ignores an interrupt at end of
the data phase because of musb_g_ep0_giveback() resetting the
state machine to "idle, waiting for SETUP" phase prematurely.
The driver also prematurely leaves the status phase on
receiving the SetupEnd interrupt.
As there were still unhandled endpoint 0 interrupts happening
from time to time after fixing these issues, there turned to
be yet another culprit: two distinct gadget states collapsed
into one.
The (missing) state that comes after STATUS IN/OUT states was
typically indiscernible from them since the corresponding
interrupts tend to happen within too little period of time
(due to only a zero-length status packet in between) and so
they got coalesced; yet this state is not the same as the next
one which is associated with the reception of a SETUP packet.
Adding this extra state seems to have fixed the rest of the
unhandled interrupts that generic_interrupt() and
davinci_interrupt() hid by faking their result and only
emitting a debug message -- so, stop doing that.
Signed-off-by: Sergei Shtylyov <sshtylyov@ru.mvista.com> Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Daniel Suchy [Wed, 13 May 2009 08:05:48 +0000 (10:05 +0200)]
USB: FTDI-SIO new device ids
I would like to have added new device to usbserial/ftdi_sio driver.
These ids used USB track device (http://www.l-and-b.dk/access_alt.html).
They use differend device IDs, but it works as standard usb-serial
conventer.
From: Daniel Suchy <danny@danysek.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Linus Torvalds [Mon, 15 Jun 2009 17:06:19 +0000 (10:06 -0700)]
Merge branch 'timers-for-linus-migration' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-migration' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
timers: Logic to move non pinned timers
timers: /proc/sys sysctl hook to enable timer migration
timers: Identifying the existing pinned timers
timers: Framework for identifying pinned timers
timers: allow deferrable timers for intervals tv2-tv5 to be deferred
Fix up conflicts in kernel/sched.c and kernel/timer.c manually
Linus Torvalds [Mon, 15 Jun 2009 16:58:50 +0000 (09:58 -0700)]
Merge branch 'timers-for-linus-clockevents' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-clockevents' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clockevent: export register_device and delta2ns
clockevents: tick_broadcast_device can become static
Linus Torvalds [Mon, 15 Jun 2009 16:58:33 +0000 (09:58 -0700)]
Merge branch 'timers-for-linus-clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip
* 'timers-for-linus-clocksource' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/linux-2.6-tip:
clocksource: prevent selection of low resolution clocksourse also for nohz=on
clocksource: sanity check sysfs clocksource changes
Linus Torvalds [Mon, 15 Jun 2009 16:32:52 +0000 (09:32 -0700)]
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (103 commits)
powerpc: Fix bug in move of altivec code to vector.S
powerpc: Add support for swiotlb on 32-bit
powerpc/spufs: Remove unused error path
powerpc: Fix warning when printing a resource_size_t
powerpc/xmon: Remove unused variable in xmon.c
powerpc/pseries: Fix warnings when printing resource_size_t
powerpc: Shield code specific to 64-bit server processors
powerpc: Separate PACA fields for server CPUs
powerpc: Split exception handling out of head_64.S
powerpc: Introduce CONFIG_PPC_BOOK3S
powerpc: Move VMX and VSX asm code to vector.S
powerpc: Set init_bootmem_done on NUMA platforms as well
powerpc/mm: Fix a AB->BA deadlock scenario with nohash MMU context lock
powerpc/mm: Fix some SMP issues with MMU context handling
powerpc: Add PTRACE_SINGLEBLOCK support
fbdev: Add PLB support and cleanup DCR in xilinxfb driver.
powerpc/virtex: Add ml510 reference design device tree
powerpc/virtex: Add Xilinx ML510 reference design support
powerpc/virtex: refactor intc driver and add support for i8259 cascading
powerpc/virtex: Add support for Xilinx PCI host bridge
...
Linus Torvalds [Mon, 15 Jun 2009 16:27:37 +0000 (09:27 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/lrg/voltage-2.6:
regulator/max1586: fix V3 gain calculation integer overflow
regulator/max1586: support increased V3 voltage range
regulator: lp3971 - fix driver link error when built-in.
LP3971 PMIC regulator driver (updated and combined version)
regulator: remove driver_data direct access of struct device
regulator: Set MODULE_ALIAS for regulator drivers
regulator: Support list_voltage for fixed voltage regulator
regulator: Move regulator drivers to subsys_initcall()
regulator: build fix for powerpc - renamed show_state
regulator: add userspace-consumer driver
Maxim 1586 regulator driver
Rusty Russell [Sat, 13 Jun 2009 05:20:15 +0000 (14:50 +0930)]
[IA64] fix compile error in arch/ia64/mm/extable.c
ad6561dffa17f17bb68d7207d422c26c381c4313 ("module: trim exception table on init
free.") put a bogus trim_init_extable() function into ia64 which didn't compile.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Signed-off-by: Tony Luck <tony.luck@intel.com>
Linus Torvalds [Mon, 15 Jun 2009 16:13:49 +0000 (09:13 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/ryusuke/nilfs2: (22 commits)
nilfs2: support contiguous lookup of blocks
nilfs2: add sync_page method to page caches of meta data
nilfs2: use device's backing_dev_info for btree node caches
nilfs2: return EBUSY against delete request on snapshot
nilfs2: modify list of unsupported features in caveats
nilfs2: enable sync_page method
nilfs2: set bio unplug flag for the last bio in segment
nilfs2: allow future expansion of metadata read out via get info ioctl
NILFS2: Pagecache usage optimization on NILFS2
nilfs2: remove nilfs_btree_operations from btree mapping
nilfs2: remove nilfs_direct_operations from direct mapping
nilfs2: remove bmap pointer operations
nilfs2: remove useless b_low and b_high fields from nilfs_bmap struct
nilfs2: remove pointless NULL check of bpop_commit_alloc_ptr function
nilfs2: move get block functions in bmap.c into btree codes
nilfs2: remove nilfs_bmap_delete_block
nilfs2: remove nilfs_bmap_put_block
nilfs2: remove header file for segment list operations
nilfs2: eliminate removal list of segments
nilfs2: add sufile function that can modify multiple segment usages
...
Philipp Zabel [Thu, 28 May 2009 19:00:03 +0000 (21:00 +0200)]
regulator/max1586: fix V3 gain calculation integer overflow
On Thu, May 28, 2009 at 10:59 AM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote:
> On Thu, May 28, 2009 at 07:15:16AM +0200, Philipp Zabel wrote:
>> The V3 regulator can be configured with an external resistor
>> connected to the feedback pin (R24 in the data sheet) to
>> increase the voltage range.
>>
>> For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
>> V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
>>
>> Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com>
>
> Looks good.
>
> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Thanks, but it turns out I hit a 32 bit integer overflow in
the gain calculation. I'd like to mend that with the following
patch. Now max_uV could be increased up to 4.294 V, enough to
charge LiPo cells.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Philipp Zabel [Thu, 28 May 2009 05:15:16 +0000 (07:15 +0200)]
regulator/max1586: support increased V3 voltage range
The V3 regulator can be configured with an external resistor
connected to the feedback pin (R24 in the data sheet) to
increase the voltage range.
For example, hx4700 has R24 = 3.32 kOhm to achieve a maximum
V3 voltage of 1.55 V which is needed for 624 MHz CPU frequency.
Signed-off-by: Philipp Zabel <philipp.zabel@gmail.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Marek Szyprowski [Tue, 19 May 2009 05:33:55 +0000 (07:33 +0200)]
LP3971 PMIC regulator driver (updated and combined version)
This patch adds regulator drivers for National Semiconductors LP3971 PMIC.
This LP3971 PMIC controller has 3 DC/DC voltage converters and 5 low
drop-out (LDO) regulators. LP3971 PMIC controller uses I2C interface.
Reviewed-by: Kyungmin Park <kyungmin.park@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
regulator: remove driver_data direct access of struct device
In the near future, the driver core is going to not allow direct access
to the driver_data pointer in struct device. Instead, the functions
dev_get_drvdata() and dev_set_drvdata() should be used. These functions
have been around since the beginning, so are backwards compatible with
all older kernel versions.
Cc: Mark Brown <broonie@opensource.wolfsonmicro.com> Cc: Liam Girdwood <lrg@slimlogic.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Mark Brown [Mon, 27 Apr 2009 17:21:18 +0000 (18:21 +0100)]
regulator: Move regulator drivers to subsys_initcall()
Regulators need to be available early in init in order to allow them
to be available for consumers when requested. This is generally done
by registering them at subsys_initcall() time but not all regulator
drivers have done that. Convert these drivers to do so in order to
mimimise future support.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: Mike Rapoport <mike@compulab.co.il> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
regulator: build fix for powerpc - renamed show_state
This patch fixes the follwing build failure on powerpc:-
> Today's linux-next build (powerpc allyesconfig) failed like this:
>
> drivers/regulator/userspace-consumer.c:43: error: conflicting types
> for 'show_state'
> include/linux/sched.h:273: note: previous definition of 'show_state'
> was here
>
> Caused by commit 5defa2bce704ca4151cfe24e4297aa7797cafd22 ("regulator:
> add userspace-consumer driver") which I have reverted for today.
Mike Rapoport [Sun, 26 Apr 2009 13:49:39 +0000 (16:49 +0300)]
regulator: add userspace-consumer driver
The userspace-consumer driver allows control of voltage and current
regulator state from userspace. This is required for fine-grained
power management of devices that are completely controller by userspace
applications, e.g. a GPS transciever connected to a serial port.
Signed-off-by: Mike Rapoport <mike@compulab.co.il> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Robert Jarzmik [Thu, 23 Apr 2009 18:10:43 +0000 (20:10 +0200)]
Maxim 1586 regulator driver
The Maxim 1586 regulator is a voltage regulator with 2
voltage outputs, specially suitable for Marvell PXA
chips. One output is in the range of required VCC_CORE by
the PXA27x chips, the other in the VCC_USIM required as well
by PXA27x chips.
The chip is controlled through the I2C bus.
Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com> Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
Jarek Poplawski [Mon, 15 Jun 2009 09:31:29 +0000 (02:31 -0700)]
ipv4: Fix fib_trie rebalancing
While doing trie_rebalance(): resize(), inflate(), halve() RCU free
tnodes before updating their parents. It depends on RCU delaying the
real destruction, but if RCU readers start after call_rcu() and before
parent update they could access freed memory.
It is currently prevented with preempt_disable() on the update side,
but it's not safe, except maybe classic RCU, plus it conflicts with
memory allocations with GFP_KERNEL flag used from these functions.
This patch explicitly delays freeing of tnodes by adding them to the
list, which is flushed after the update is finished.
Reported-by: Yan Zheng <zheng.yan@oracle.com> Signed-off-by: Jarek Poplawski <jarkao2@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Mike Frysinger [Sun, 14 Jun 2009 21:56:48 +0000 (22:56 +0100)]
ramfs: ignore unknown mount options
On systems where CONFIG_SHMEM is disabled, mounting tmpfs filesystems can
fail when tmpfs options are used. This is because tmpfs creates a small
wrapper around ramfs which rejects unknown options, and ramfs itself only
supports a tiny subset of what tmpfs supports. This makes it pretty hard
to use the same userspace systems across different configuration systems.
As such, ramfs should ignore the tmpfs options when tmpfs is merely a
wrapper around ramfs.
This used to work before commit c3b1b1cbf0 as previously, ramfs would
ignore all options. But now, we get:
ramfs: bad mount option: size=10M
mount: mounting mdev on /dev failed: Invalid argument
Another option might be to restore the previous behavior, where ramfs
simply ignored all unknown mount options ... which is what Hugh prefers.
Linus Torvalds [Sun, 14 Jun 2009 21:12:18 +0000 (14:12 -0700)]
Merge branch 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next
* 'master' of git://git.kernel.org/pub/scm/linux/kernel/git/sam/kbuild-next: (53 commits)
.gitignore: ignore *.lzma files
kbuild: add generic --set-str option to scripts/config
kbuild: simplify argument loop in scripts/config
kbuild: handle non-existing options in scripts/config
kallsyms: generalize text region handling
kallsyms: support kernel symbols in Blackfin on-chip memory
documentation: make version fix
kbuild: fix a compile warning
gitignore: Add GNU GLOBAL files to top .gitignore
kbuild: fix delay in setlocalversion on readonly source
README: fix misleading pointer to the defconf directory
vmlinux.lds.h update
kernel-doc: cleanup perl script
Improve vmlinux.lds.h support for arch specific linker scripts
kbuild: fix headers_exports with boolean expression
kbuild/headers_check: refine extern check
kbuild: fix "Argument list too long" error for "make headers_check",
ignore *.patch files
Remove bashisms from scripts
menu: fix embedded menu presentation
...
Linus Torvalds [Sun, 14 Jun 2009 20:53:22 +0000 (13:53 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/roland/infiniband:
mlx4_core: Don't double-free IRQs when falling back from MSI-X to INTx
IB/mthca: Don't double-free IRQs when falling back from MSI-X to INTx
IB/mlx4: Add strong ordering to local inval and fast reg work requests
IB/ehca: Remove superfluous bitmasks from QP control block
RDMA/cxgb3: Limit fast register size based on T3 limitations
RDMA/cxgb3: Report correct port state and MTU
mlx4_core: Add module parameter for number of MTTs per segment
IB/mthca: Add module parameter for number of MTTs per segment
RDMA/nes: Fix off-by-one bugs in reset_adapter_ne020() and init_serdes()
infiniband: Remove void casts
IB/ehca: Increment version number
IB/ehca: Remove unnecessary memory operations for userspace queue pairs
IB/ehca: Fall back to vmalloc() for big allocations
IB/ehca: Replace vmalloc() with kmalloc() for queue allocation
In addition to KT_DEAD which has limited support for diacriticals,
there is KT_DEAD2 that can support 256 criticals, so let's advertise
it in <linux/keyboard.h>.
This lets userland know abut the drivers/char/keyboard.c function
k_dead2, which supports more than the few trivial ones that k_dead
supports.
Signed-off-by: Samuel Thibault <samuel.thibault@ens-lyon.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Linus Torvalds [Sun, 14 Jun 2009 20:46:57 +0000 (13:46 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc: (25 commits)
atmel-mci: add MCI2 register definitions
atmel-mci: Integrate AT91 specific definition in header file
tmio_mmc: allow compilation for ASIC3
mmc_block: do not DMA to stack
sdhci: Print ADMA status and pointer on debug
tmio_mmc: fix clock setup
tmio_mmc: map SD control registers after enabling the MFD cell
tmio_mmc: correct probe return value for num_resources != 3
tmio_mmc: don't use set_irq_type
tmio_mmc: add bus_shift support
MFD,mmc: tmio_mmc: make HCLK configurable
mmc_spi: don't use EINVAL for possible transmission errors
cb710: more cleanup for the DEBUG case.
sdhci: platform driver for SDHCI
mxcmmc: remove frequency workaround
cb710: handle DEBUG define in Makefile
cb710: add missing parenthesis
cb710: fix printk format string
mmc: Driver for CB710/720 memory card reader (MMC part)
pxamci: add regulator support.
...
Linus Torvalds [Sun, 14 Jun 2009 20:45:49 +0000 (13:45 -0700)]
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid
* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/hid:
HID: fix inverted wheel for bluetooth version of apple mighty mouse
HID: no more reinitializtion is needed in post_reset
HID: hidraw -- fix comment about accepted devices
HID: Multitouch support for the N-Trig touchscreen
HID: add new multitouch and digitizer contants
HID: autocentering support for Logitech Force 3D Pro
HID: fix hid-ff drivers so that devices work even without ff support
HID: force feedback support for SmartJoy PLUS PS2/USB adapter
HID: Wacom Graphire Bluetooth driver
HID: autocentering support for Logitech G25 Racing Wheel
Robin Getz [Mon, 10 Jul 2006 06:25:40 +0000 (06:25 +0000)]
kallsyms: support kernel symbols in Blackfin on-chip memory
The Blackfin arch has a discontiguous .text layout due to having on-chip
instruction memory and no virtual memory support. As such, we need to
add explicit checks for these additional .text regions.
Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Bryan Wu <cooloney@kernel.org> Signed-off-by: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Linus Torvalds [Sun, 14 Jun 2009 20:42:43 +0000 (13:42 -0700)]
Merge branch 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm
* 'for-linus' of master.kernel.org:/home/rmk/linux-2.6-arm: (417 commits)
MAINTAINERS: EB110ATX is not ebsa110
MAINTAINERS: update Eric Miao's email address and status
fb: add support of LCD display controller on pxa168/910 (base layer)
[ARM] 5552/1: ep93xx get_uart_rate(): use EP93XX_SYSCON_PWRCNT and EP93XX_SYSCON_PWRCN
[ARM] pxa/sharpsl_pm: zaurus needs generic pxa suspend/resume routines
[ARM] 5544/1: Trust PrimeCell resource sizes
[ARM] pxa/sharpsl_pm: cleanup of gpio-related code.
[ARM] pxa/sharpsl_pm: drop set_irq_type calls
[ARM] pxa/sharpsl_pm: merge pxa-specific code into generic one
[ARM] pxa/sharpsl_pm: merge the two sharpsl_pm.c since it's now pxa specific
[ARM] sa1100: remove unused collie_pm.c
[ARM] pxa: fix the conflicting non-static declarations of global_gpios[]
[ARM] 5550/1: Add default configure file for w90p910 platform
[ARM] 5549/1: Add clock api for w90p910 platform.
[ARM] 5548/1: Add gpio api for w90p910 platform
[ARM] 5551/1: Add multi-function pin api for w90p910 platform.
[ARM] Make ARM_VIC_NR depend on ARM_VIC
[ARM] 5546/1: ARM PL022 SSP/SPI driver v3
ARM: OMAP4: SMP: Update defconfig for OMAP4430
ARM: OMAP4: SMP: Enable SMP support for OMAP4430
...
The Makefiles in the build directories use the internal make variable
MAKEFILE_LIST which is available from make 3.80 only. (The patch would be
valid back to 2.6.25)
Signed-off-by: Adam Lackorzynski <adam@os.inf.tu-dresden.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Roland Dreier [Sun, 14 Jun 2009 20:30:45 +0000 (13:30 -0700)]
mlx4_core: Don't double-free IRQs when falling back from MSI-X to INTx
When both MSI-X and legacy INTx fail to generate an interrupt, the
driver frees the MSI-X interrupts twice. Fix this by clearing the
have_irq flag for the MSI-X interrupts when they are freed the first
time. This is the same bug that was reported in ib_mthca by Yinghai
Lu <yhlu.kernel@gmail.com>.
Marcel Holtmann [Sun, 14 Jun 2009 13:24:44 +0000 (15:24 +0200)]
Bluetooth: Fix issue with uninitialized nsh.type in DTL-1 driver
The current build shows a warning with the DTL-1 driver:
CC [M] drivers/bluetooth/dtl1_cs.o
drivers/bluetooth/dtl1_cs.c: In function ‘dtl1_hci_send_frame’:
drivers/bluetooth/dtl1_cs.c:396: warning: ‘nsh.type’ may be used uninitialized in this function
Fix this by adding a proper error for unknown packet types.
Nicolas Pitre [Fri, 12 Jun 2009 02:09:29 +0000 (03:09 +0100)]
[ARM] 5545/2: add flush_kernel_dcache_page() for ARM
Without this, the default implementation is a no op which is completely
wrong with a VIVT cache, and usage of sg_copy_buffer() produces
unpredictable results.
Tested-by: Sebastian Andrzej Siewior <bigeasy@breakpoint.cc> CC: stable@kernel.org Signed-off-by: Nicolas Pitre <nico@marvell.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Tom Goff [Sun, 14 Jun 2009 10:16:13 +0000 (03:16 -0700)]
PIM-SM: namespace changes
IPv4:
- make PIM register vifs netns local
- set the netns when a PIM register vif is created
- make PIM available in all network namespaces (if CONFIG_IP_PIMSM_V2)
by adding the protocol handler when multicast routing is initialized
IPv6:
- make PIM register vifs netns local
- make PIM available in all network namespaces (if CONFIG_IPV6_PIMSM_V2)
by adding the protocol handler when multicast routing is initialized
Signed-off-by: Tom Goff <thomas.goff@boeing.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Timo Teräs [Thu, 11 Jun 2009 19:38:02 +0000 (19:38 +0000)]
ipv4: update ARPD help text
Removed the statements about ARP cache size as this config option does
not affect it. The cache size is controlled by neigh_table gc thresholds.
Remove also expiremental and obsolete markings as the API originally
intended for arp caching is useful for implementing ARP-like protocols
(e.g. NHRP) in user space and has been there for a long enough time.
Signed-off-by: Timo Teras <timo.teras@iki.fi> Signed-off-by: David S. Miller <davem@davemloft.net>
Eric Dumazet [Thu, 11 Jun 2009 20:10:07 +0000 (20:10 +0000)]
net: use a deferred timer in rt_check_expire
For the sake of power saver lovers, use a deferrable timer to fire
rt_check_expire()
As some big routers cache equilibrium depends on garbage collection
done in time, we take into account elapsed time between two
rt_check_expire() invocations to adjust the amount of slots we have to
check.
Based on an initial idea and patch from Tero Kristo
Signed-off-by: Eric Dumazet <eric.dumazet@gmail.com> Signed-off-by: Tero Kristo <tero.kristo@nokia.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Randy Dunlap [Fri, 12 Jun 2009 12:59:20 +0000 (12:59 +0000)]
ieee802154: fix kconfig bool/tristate muckup
menuconfig IEEE802154_DRIVERS is a bool that depends on tristate IEEE802154.
If the IEEE802154 symbol is 'm', the bool becomes 'y'.
This allows tristate symbols under IEEE802154_DRIVERS to be configured as
'y' and cause build problems.
Changing the menuconfig bool to a tristate fixes this.
drivers/built-in.o: In function `fake_scan_req':
fakehard.c:(.text+0x46d625): undefined reference to `ieee802154_nl_scan_confirm'
drivers/built-in.o: In function `fake_disassoc_req':
fakehard.c:(.text+0x46d66f): undefined reference to `ieee802154_nl_disassoc_confirm'
drivers/built-in.o: In function `fake_assoc_req':
fakehard.c:(.text+0x46d6be): undefined reference to `ieee802154_nl_assoc_confirm'
Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Acked-by: Sergey Lapin <slapin@ossfans.org> Signed-off-by: David S. Miller <davem@davemloft.net>
The bonding device acts unlike all other Linux network device functions
in that it ignores case of device names. The developer must have come
from windows!
Cleanup the management of names and use standard routines where possible.
Flag places where bonding device still doesn't work right with network
namespaces.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
The "expected_refcount" stuff in bonding sysfs module is a mistake.
Sysfs does proper refcounting, and it is okay to remove a bond device
that has some user process holding the file open.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Resolve some of the complaints from checkpatch, and remove "magic emacs format"
comments, and useless MODULE_SUPPORTED_DEVICE(). But should not
change actual code.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>
It is not safe to use a network device destructor that is a function in
the module, since it can be called after module is unloaded if sysfs
handle is open.
When eventually using netlink, the device cleanup code needs to be done
via uninit function.
Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: David S. Miller <davem@davemloft.net>