]> Git Repo - linux.git/log
linux.git
11 years agoregulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_sel
Axel Lin [Wed, 24 Apr 2013 03:51:12 +0000 (11:51 +0800)]
regulator: mc13892: Fix MC13892_SWITCHERS0_SWxHI bit in set_voltage_sel

It is necessary to clear MC13892_SWITCHERS0_SWxHI bit when set voltage to the
voltage range from 1100000 to 1375000. Leaving MC13892_SWITCHERS0_SWxHI bit
untouched may result in wrong voltage setting.

For example, currently switch voltage from 1400000 to 1300000 will set the
voltage to 1800000 because the HI bit is still set.

Signed-off-by: Axel Lin <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoMerge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc
Linus Torvalds [Thu, 25 Apr 2013 00:10:18 +0000 (17:10 -0700)]
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc

Pull sparc fix from David Miller:
 "Brown paper bag fix for sparc64"

* git://git.kernel.org/pub/scm/linux/kernel/git/davem/sparc:
  sparc64: Fix missing put_cpu_var() in tlb_batch_add_one() when not batching.

11 years agoMerge tag 'gpio-v3.9-lastminute' of git://git.kernel.org/pub/scm/linux/kernel/git...
Linus Torvalds [Thu, 25 Apr 2013 00:01:58 +0000 (17:01 -0700)]
Merge tag 'gpio-v3.9-lastminute' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio

Pull gpi fix from Linus Walleij:
 "This is a last minute revert for the GPIO tree, as Mike Dunn noticed
  breakage on some older PXA machines due to moving PXA GPIO initcalls
  to the module_init initlevel"

* tag 'gpio-v3.9-lastminute' of git://git.kernel.org/pub/scm/linux/kernel/git/linusw/linux-gpio:
  Revert "gpio: pxa: set initcall level to module init"

11 years agosparc64: Fix missing put_cpu_var() in tlb_batch_add_one() when not batching.
David S. Miller [Wed, 24 Apr 2013 23:52:18 +0000 (16:52 -0700)]
sparc64: Fix missing put_cpu_var() in tlb_batch_add_one() when not batching.

Reported-by: Meelis Roos <[email protected]>
Signed-off-by: David S. Miller <[email protected]>
11 years agoktest: Reset grub menu cache with different machines
Steven Rostedt (Red Hat) [Wed, 24 Apr 2013 20:03:30 +0000 (16:03 -0400)]
ktest: Reset grub menu cache with different machines

Different tests may use a different machine. In such cases, we need to
try to get the current grub menu index. If the same grub menu is used
for two different machines, it may not be at the same index on the
second machine. A search for the index must be performed again.

Signed-off-by: Steven Rostedt <[email protected]>
11 years agoRevert "gpio: pxa: set initcall level to module init"
Linus Walleij [Wed, 24 Apr 2013 19:41:20 +0000 (21:41 +0200)]
Revert "gpio: pxa: set initcall level to module init"

This reverts commit 6c7e660a27da7494c670bfba21cfeba30457656c.

The commit causes breakage on several older PXA machines.

Reported-by: Mike Dunn <[email protected]>
Acked-by: Haojian Zhuang <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
11 years agoMerge branch 'pci/gavin-msi-cleanup' into next
Bjorn Helgaas [Wed, 24 Apr 2013 17:37:49 +0000 (11:37 -0600)]
Merge branch 'pci/gavin-msi-cleanup' into next

* pci/gavin-msi-cleanup:
  vfio-pci: Use cached MSI/MSI-X capabilities
  vfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
  PCI: Remove "extern" from function declarations
  PCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
  PCI: Drop msi_mask_reg() and remove drivers/pci/msi.h
  PCI: Use msix_table_size() directly, drop multi_msix_capable()
  PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros
  PCI: Drop is_64bit_address() and is_mask_bit_support() macros
  PCI: Drop msi_data_reg() macro
  PCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros
  PCI: Drop msi_control_reg() macro and use PCI_MSI_FLAGS directly
  PCI: Use cached MSI/MSI-X offsets from dev, not from msi_desc
  PCI: Clean up MSI/MSI-X capability #defines
  PCI: Use cached MSI-X cap while enabling MSI-X
  PCI: Use cached MSI cap while enabling MSI interrupts
  PCI: Remove MSI/MSI-X cap check in pci_msi_check_device()
  PCI: Cache MSI/MSI-X capability offsets in struct pci_dev
  PCI: Use u8, not int, for PM capability offset
  [SCSI] megaraid_sas: Use correct #define for MSI-X capability

11 years agovfio-pci: Use cached MSI/MSI-X capabilities
Bjorn Helgaas [Thu, 18 Apr 2013 21:12:58 +0000 (15:12 -0600)]
vfio-pci: Use cached MSI/MSI-X capabilities

We now cache the MSI/MSI-X capability offsets in the struct pci_dev,
so no need to find the capabilities again.

Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Alex Williamson <[email protected]>
11 years agovfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
Bjorn Helgaas [Thu, 18 Apr 2013 18:42:58 +0000 (12:42 -0600)]
vfio-pci: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK

PCI_MSIX_FLAGS_BIRMASK is mis-named because the BIR mask is in the
Table Offset register, not the flags ("Message Control" per spec)
register.

Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Alex Williamson <[email protected]>
11 years agoUSB: ftdi_sio: enable two UART ports on ST Microconnect Lite
Adrian Thomasset [Wed, 24 Apr 2013 10:37:35 +0000 (11:37 +0100)]
USB: ftdi_sio: enable two UART ports on ST Microconnect Lite

The FT4232H used in the ST Micro Connect Lite has four hi-speed UART ports.
The first two ports are reserved for the JTAG interface.

We enable by default ports 2 and 3 as UARTs (where port 2 is a
conventional RS-232 UART)

Signed-off-by: Adrian Thomasset <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoTools: hv: Fix a checkpatch warning
K. Y. Srinivasan [Wed, 24 Apr 2013 14:48:54 +0000 (07:48 -0700)]
Tools: hv: Fix a checkpatch warning

Fix a checkpatch warning.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agotools: hv: skip iso9660 mounts in hv_vss_daemon
Olaf Hering [Wed, 24 Apr 2013 14:48:53 +0000 (07:48 -0700)]
tools: hv: skip iso9660 mounts in hv_vss_daemon

fsreeze does not work for iso9660 filesystems. A ENOSUPP may be caught
in the freeze case, but the subsequent thaw call would fail and leads to
a false error.

Signed-off-by: Olaf Hering <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agotools: hv: use FIFREEZE/FITHAW in hv_vss_daemon
Olaf Hering [Wed, 24 Apr 2013 14:48:52 +0000 (07:48 -0700)]
tools: hv: use FIFREEZE/FITHAW in hv_vss_daemon

As suggested by Paolo Bonzini, use ioctl instead of calling fsfreeze.

Signed-off-by: Olaf Hering <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agotools: hv: use getmntent in hv_vss_daemon
Olaf Hering [Wed, 24 Apr 2013 14:48:51 +0000 (07:48 -0700)]
tools: hv: use getmntent in hv_vss_daemon

As suggested by Paolo Bonzini, use getmntent instead of parsing output
of mount(1).

Signed-off-by: Olaf Hering <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoTools: hv: Fix a checkpatch warning
K. Y. Srinivasan [Wed, 24 Apr 2013 14:48:50 +0000 (07:48 -0700)]
Tools: hv: Fix a checkpatch warning

Fix a checkpatch warning.

Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agotools: hv: fix checks for origin of netlink message in hv_vss_daemon
Olaf Hering [Wed, 24 Apr 2013 14:48:49 +0000 (07:48 -0700)]
tools: hv: fix checks for origin of netlink message in hv_vss_daemon

Similar to what commit 95a69adab9acfc3981c504737a2b6578e4d846ef ("tools:
hv: Netlink source address validation allows DoS") does in
hv_kvp_daemon, improve checks for origin of netlink connector message.

Signed-off-by: Olaf Hering <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoTools: hv: fix warnings in hv_vss_daemon
Olaf Hering [Wed, 24 Apr 2013 14:48:48 +0000 (07:48 -0700)]
Tools: hv: fix warnings in hv_vss_daemon

This change fixes a few compile errors:

hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
hv_vss_daemon.c:64:15: warning: unknown escape sequence '\/'
hv_vss_daemon.c: In function 'vss_operate':
hv_vss_daemon.c:66: warning: 'return' with no value, in function returning non-void
hv_vss_daemon.c: In function 'main':
hv_vss_daemon.c:130: warning: ignoring return value of 'daemon', declared with attribute warn_unused_result
hv_vss_daemon.c: In function 'vss_operate':
hv_vss_daemon.c:47: warning: 'fs_op' may be used uninitialized in this function

Signed-off-by: Olaf Hering <[email protected]>
Signed-off-by: K. Y. Srinivasan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoefi: Check EFI revision in setup_efi_vars
Josh Boyer [Wed, 24 Apr 2013 15:16:52 +0000 (11:16 -0400)]
efi: Check EFI revision in setup_efi_vars

We need to check the runtime sys_table for the EFI version the firmware
specifies instead of just checking for a NULL QueryVariableInfo.  Older
implementations of EFI don't have QueryVariableInfo but the runtime is
a smaller structure, so the pointer to it may be pointing off into garbage.

This is apparently the case with several Apple firmwares that support EFI
1.10, and the current check causes them to no longer boot.  Fix based on
a suggestion from Matthew Garrett.

Signed-off-by: Josh Boyer <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
11 years agox86, efi: Fix a build warning
Borislav Petkov [Wed, 24 Apr 2013 10:09:14 +0000 (12:09 +0200)]
x86, efi: Fix a build warning

Fix this:

arch/x86/boot/compressed/eboot.c: In function ‘setup_efi_vars’:
arch/x86/boot/compressed/eboot.c:269:2: warning: passing argument 1 of ‘efi_call_phys’ makes pointer from integer without a cast [enabled by default]
In file included from arch/x86/boot/compressed/eboot.c:12:0:
/w/kernel/linux/arch/x86/include/asm/efi.h:8:33: note: expected ‘void *’ but argument is of type ‘long unsigned int’

after cc5a080c5d40 ("efi: Pass boot services variable info to runtime
code").

Reported-by: Paul Bolle <[email protected]>
Cc: Matthew Garrett <[email protected]>
Signed-off-by: Borislav Petkov <[email protected]>
Signed-off-by: Matt Fleming <[email protected]>
11 years agoARM: dts: add pinctrl property for spi node for atmel SoC
Wenyou Yang [Wed, 3 Apr 2013 06:03:52 +0000 (14:03 +0800)]
ARM: dts: add pinctrl property for spi node for atmel SoC

Signed-off-by: Wenyou Yang <[email protected]>
Tested-by: Richard Genoud <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoARM: dts: add spi nodes for the atmel boards
Richard Genoud [Wed, 3 Apr 2013 06:03:05 +0000 (14:03 +0800)]
ARM: dts: add spi nodes for the atmel boards

Signed-off-by: Richard Genoud <[email protected]>
[[email protected]: added spi nodes for the sam9263ek, sam9g20ek, sam9m10g45ek and sam9n12ek boards]
[[email protected]: submit the patch]
Signed-off-by: Wenyou Yang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoARM: dts: add spi nodes for atmel SoC
Richard Genoud [Wed, 3 Apr 2013 06:02:18 +0000 (14:02 +0800)]
ARM: dts: add spi nodes for atmel SoC

Signed-off-by: Richard Genoud <[email protected]>
[[email protected]: add spi nodes for sam9260, sam9263, sam9g45 and sam9n12]
[[email protected]: remove spi property "cs-gpios" to the board dts files]
[[email protected]: submit the patch]
Signed-off-by: Wenyou Yang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoARM: at91: add clocks for spi dt entries
Richard Genoud [Wed, 3 Apr 2013 06:01:22 +0000 (14:01 +0800)]
ARM: at91: add clocks for spi dt entries

Signed-off-by: Richard Genoud <[email protected]>
[<[email protected]: declare the spi clocks for sam9260, at91sam9g45, and at91sam9n12]
[[email protected]: submit the patch]
Signed-off-by: Wenyou Yang <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agospi/spi-atmel: add dmaengine support
Nicolas Ferre [Wed, 3 Apr 2013 05:59:19 +0000 (13:59 +0800)]
spi/spi-atmel: add dmaengine support

Add dmaengine support.

Using "has_dma_support" member of struct is used to select
the transfer mode: dmaengine or pdc.

For the dmaengine transfer mode, it supports both 8 bits and 16 bits transfer.

For the dmaengine transfer mode, if it fails to config dmaengine,
or if the message length is less than 16 bytes, it will use the PIO transfer mode.

Signed-off-by: Nicolas Ferre <[email protected]>
[[email protected]: using "has_dma_support" to select dmaengine as the spi xfer mode]
[[email protected]: fix DMA: OOPS if buffer > 4096 bytes]
[[email protected]: submit the patch]
Signed-off-by: Wenyou Yang <[email protected]>
Signed-off-by: Richard Genoud <[email protected]>
[[email protected]: update with dmaengine interface]
[[email protected]: fix __init/__devinit sections mismatch]
[[email protected]: adapt to slave_config changes]
[[email protected]: add support t0 16 bits transfer]
Tested-by: Richard Genoud <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoregulator: ab3100: device tree support
Linus Walleij [Mon, 22 Apr 2013 09:57:25 +0000 (11:57 +0200)]
regulator: ab3100: device tree support

This implements device tree support for the AB3100 regulators
driver. The initial settings are moved out of platform data
and into the driver for the device tree case, as it appears
that there is no way to supply this as AUXDATA for an I2C
device. The style and bindings are heavily inspired by
Lee Jones' style for AB8500.

Signed-off-by: Linus Walleij <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoregulator: ab3100: refactor probe to use IDs
Linus Walleij [Mon, 22 Apr 2013 09:57:14 +0000 (11:57 +0200)]
regulator: ab3100: refactor probe to use IDs

This refactors the AB3100 regulator probe to use regulator IDs
and pass this to a separate registration function. This works
much smoother when migrating to device tree, as we can use a
match table with this regulator ID encoded in the .driver_data.

Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agoregulator: max8973: Don't override control1 variable when set ramp delay bits
Axel Lin [Tue, 23 Apr 2013 16:14:55 +0000 (00:14 +0800)]
regulator: max8973: Don't override control1 variable when set ramp delay bits

Current code overrides control1 variable when setting ramp delay bits.
Fix it by just setting ramp_delay bits.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Laxman Dewangan <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agofbdev/sgivwfb: use vm_iomap_memory()
Tomi Valkeinen [Thu, 18 Apr 2013 04:50:44 +0000 (07:50 +0300)]
fbdev/sgivwfb: use vm_iomap_memory()

Use vm_iomap_memory() instead of [io_]remap_pfn_range().
vm_iomap_memory() gives us much simpler API to map memory to userspace,
and reduces possibilities for bugs.

Signed-off-by: Tomi Valkeinen <[email protected]>
11 years agofbdev/vermillion: use vm_iomap_memory()
Tomi Valkeinen [Thu, 18 Apr 2013 04:47:47 +0000 (07:47 +0300)]
fbdev/vermillion: use vm_iomap_memory()

Use vm_iomap_memory() instead of [io_]remap_pfn_range().
vm_iomap_memory() gives us much simpler API to map memory to userspace,
and reduces possibilities for bugs.

Signed-off-by: Tomi Valkeinen <[email protected]>
Cc: Alan Hourihane <[email protected]>
11 years agofbdev/sa1100fb: use vm_iomap_memory()
Tomi Valkeinen [Wed, 17 Apr 2013 10:55:59 +0000 (13:55 +0300)]
fbdev/sa1100fb: use vm_iomap_memory()

Use vm_iomap_memory() instead of [io_]remap_pfn_range().
vm_iomap_memory() gives us much simpler API to map memory to userspace,
and reduces possibilities for bugs.

Signed-off-by: Tomi Valkeinen <[email protected]>
Acked-by: Russell King <[email protected]>
11 years agofbdev/fb-puv3: use vm_iomap_memory()
Tomi Valkeinen [Wed, 17 Apr 2013 10:48:43 +0000 (13:48 +0300)]
fbdev/fb-puv3: use vm_iomap_memory()

Use vm_iomap_memory() instead of [io_]remap_pfn_range().
vm_iomap_memory() gives us much simpler API to map memory to userspace,
and reduces possibilities for bugs.

Signed-off-by: Tomi Valkeinen <[email protected]>
Cc: Guan Xuetao <[email protected]>
11 years agofbdev/controlfb: use vm_iomap_memory()
Tomi Valkeinen [Wed, 17 Apr 2013 10:44:19 +0000 (13:44 +0300)]
fbdev/controlfb: use vm_iomap_memory()

Use vm_iomap_memory() instead of [io_]remap_pfn_range().
vm_iomap_memory() gives us much simpler API to map memory to userspace,
and reduces possibilities for bugs.

Signed-off-by: Tomi Valkeinen <[email protected]>
11 years agofbdev/omapfb: use vm_iomap_memory()
Tomi Valkeinen [Wed, 17 Apr 2013 10:05:07 +0000 (13:05 +0300)]
fbdev/omapfb: use vm_iomap_memory()

Use vm_iomap_memory() instead of [io_]remap_pfn_range().
vm_iomap_memory() gives us much simpler API to map memory to userspace,
and reduces possibilities for bugs.

Signed-off-by: Tomi Valkeinen <[email protected]>
11 years agostaging: comedi: ni_labpc: fix legacy driver build
H Hartley Sweeten [Tue, 23 Apr 2013 18:05:06 +0000 (11:05 -0700)]
staging: comedi: ni_labpc: fix legacy driver build

CONFIG_COMEDI_NI_LABPC_ISA is a tristate option. #if IS_ENABLED()
needs to be used instead of #ifdef in order to build the legacy
specific code in this driver.

The local variable 'board' is not used in labpc_attach(). Remove it.

The labpc_detach() function is only referenced in this file. Make
it static.

Signed-off-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agousb: phy: tegra: don't call into tegra-ehci directly
Arnd Bergmann [Tue, 23 Apr 2013 19:05:40 +0000 (21:05 +0200)]
usb: phy: tegra: don't call into tegra-ehci directly

Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one,
which does not work if one of them or both are loadable modules, resulting
in an error like:

drivers/built-in.o: In function `utmi_phy_clk_disable':
drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_clk_enable':
drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd'
drivers/built-in.o: In function `utmi_phy_power_on':
drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts'

This turns the interface into a one-way dependency by letting the tegra ehci
driver pass two function pointers for callbacks that need to be called by
the phy driver.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Venu Byravarasu <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Felipe Balbi <[email protected]>
Cc: Stephen Warren <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agospi/spi-atmel: add flag to controller data for lock operations
Nicolas Ferre [Wed, 3 Apr 2013 05:58:36 +0000 (13:58 +0800)]
spi/spi-atmel: add flag to controller data for lock operations

Will allow to drop the lock during DMA operations.

Replacing non-irqsave versions with irqsave versions of the lock
to make it correct in both pdc and dmaengine transfer mode

Signed-off-by: Nicolas Ferre <[email protected]>
[[email protected]: submit the patch]
Signed-off-by: Wenyou Yang <[email protected]>
Tested-by: Richard Genoud <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agospi/spi-atmel: add physical base address
Nicolas Ferre [Wed, 3 Apr 2013 05:57:42 +0000 (13:57 +0800)]
spi/spi-atmel: add physical base address

Needed for future use with dmaengine enabled driver.

Signed-off-by: Nicolas Ferre <[email protected]>
[[email protected]: submit the patch]
Signed-off-by: Wenyou Yang <[email protected]>
Tested-by: Richard Genoud <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agospi/sirf: fix MODULE_DEVICE_TABLE
Arnd Bergmann [Tue, 23 Apr 2013 16:30:41 +0000 (18:30 +0200)]
spi/sirf: fix MODULE_DEVICE_TABLE

This fixes building the spi-sirf driver as a loadable module, which uses
an incorrect MODULE_DEVICE_TABLE, by changing the reference to the
correct symbol.

Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Mark Brown <[email protected]>
11 years agotty/serial/sirf: fix MODULE_DEVICE_TABLE
Arnd Bergmann [Tue, 23 Apr 2013 16:30:49 +0000 (18:30 +0200)]
tty/serial/sirf: fix MODULE_DEVICE_TABLE

This fixes building the sirfsorc-uart driver as a loadable module,
which uses an incorrect MODULE_DEVICE_TABLE, by changing the reference to the
correct symbol.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: cleanup the cio-das802/16 fifo comments
H Hartley Sweeten [Tue, 23 Apr 2013 01:38:26 +0000 (18:38 -0700)]
staging: comedi: das800: cleanup the cio-das802/16 fifo comments

Cleanup the comments about the cio-das802/16 specific register
defines. This also removes a checkpatch.pl warning about > 80
char lines.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: rename CamelCase vars in das800_ai_do_cmd()
H Hartley Sweeten [Tue, 23 Apr 2013 01:38:06 +0000 (18:38 -0700)]
staging: comedi: das800: rename CamelCase vars in das800_ai_do_cmd()

Rename the CamelCase variables in das800_ai_do_cmd().

For aesthetic reasons, initialize the variables when they are
declared.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: tidy up the private data
H Hartley Sweeten [Tue, 23 Apr 2013 01:37:48 +0000 (18:37 -0700)]
staging: comedi: das800: tidy up the private data

For aesthetic reasons, change the 'do_bits' type to unsigned int
to match the subdevice s->state. and change the 'forever' flag
to a bool.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: tidy up das800_interrupt()
H Hartley Sweeten [Tue, 23 Apr 2013 01:37:29 +0000 (18:37 -0700)]
staging: comedi: das800: tidy up das800_interrupt()

Rename the CamelCase variable 'dataPoint'.

Cleanup some of the comments and fix the > 80 char lines.

Use the das800_ai_get_sample() helper to get the analog input data.

Change the fifo flags into bools and make sure to check for the
fifo overflow while reading the samples. This also fixes the overflow
detection for 12-bit resolutions. In the current code the 'dataPoint'
value has been shifted and masked. This could result in fifo_overflow
being invalidly true.

Remove the need for the 'thisboard' pointer by using the subdevice
'maxdata' to determine the sample size.

The devpriv->forever flag is really a bool. Treat it as such.

Remove the comedi_error() messages. The user will get the error
condition back in the async event. The message is just added noise.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: tidy up das800_ai_insn_read()
H Hartley Sweeten [Tue, 23 Apr 2013 01:37:03 +0000 (18:37 -0700)]
staging: comedi: das800: tidy up das800_ai_insn_read()

Introduce a couple helper functions to read the 16-bit analog input
sample and to wait for the analog conversion to complete.

Tidy up the das800_ai_insn_read() function by using the new helpers.
Also, remove the need for 'thisboard' in the function by checking the
subdevice 'maxdata' variable to determine the analog input resolution.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: tidy up das800_di_insn_bits()
H Hartley Sweeten [Tue, 23 Apr 2013 01:36:45 +0000 (18:36 -0700)]
staging: comedi: das800: tidy up das800_di_insn_bits()

For digital input subdevices, the (*insn_bits) function simply needs
to return the status of the input channels in data[1].

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: tidy up das800_do_insn_bits()
H Hartley Sweeten [Tue, 23 Apr 2013 01:36:28 +0000 (18:36 -0700)]
staging: comedi: das800: tidy up das800_do_insn_bits()

Use a couple local variables, mask and bits, to clarify this function.

Its only necessary to update the outputs if the mask indicates that
the bits are changing. Modify this function accordingly. Also, use
the subdevice 'state' variable to hold the actual output channel
state instead of needing to get it from the private data and shift
it.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: remove extra divisor calculation call
H Hartley Sweeten [Tue, 23 Apr 2013 01:36:11 +0000 (18:36 -0700)]
staging: comedi: das800: remove extra divisor calculation call

The comedi core always calls the (*do_cmdtest) function before it
calls the (*do_cmd) function. The divisors were already calculated
in das800_ai_do_cmdtest(), it is not necessary to calculate them
again in das800_ai_do_cmd().

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: rename {enable,disable}_das800
H Hartley Sweeten [Tue, 23 Apr 2013 01:35:49 +0000 (18:35 -0700)]
staging: comedi: das800: rename {enable,disable}_das800

For aesthetic reasons, rename these functions to match the namespace
of the rest of the driver. Also, remove the unnecessary comments.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: tidy up subdevice init
H Hartley Sweeten [Tue, 23 Apr 2013 01:35:31 +0000 (18:35 -0700)]
staging: comedi: das800: tidy up subdevice init

For aesthetic reasons, rename some of the subdevice functions
to help with greps and add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: allow attaching without interrupt support
H Hartley Sweeten [Tue, 23 Apr 2013 01:35:12 +0000 (18:35 -0700)]
staging: comedi: das800: allow attaching without interrupt support

Interrupts are only requires for the analog input async command support.

Allow the driver to attach to the board if the request_irq() fails.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: interrupts are required for async command support
H Hartley Sweeten [Tue, 23 Apr 2013 01:34:54 +0000 (18:34 -0700)]
staging: comedi: das800: interrupts are required for async command support

Interrupt support is optional with this driver. Only hook up the async
command support for the analog input subdevice if the user requested an
interrupt when attaching to the board. This also allows removing the
extra test in das800_ai_do_cmd().

For aesthetic reasons, add some whitespace to the subdevice init.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: tidy up das800_ai_do_cmdtest()
H Hartley Sweeten [Tue, 23 Apr 2013 01:34:35 +0000 (18:34 -0700)]
staging: comedi: das800: tidy up das800_ai_do_cmdtest()

For aesthetic reasons, move some of the local variables to the place
they are actually used. Also, rename the CamelCase 'startChan' local
variable.

Remove the unnecessary '()' around the variables passed in the
i8253_cascade_ns_to_timer_2div() call.

Add a local variable, 'next', to hold the cmd->chanlist[i] value
used in the loop that checks the channel/gain list.

Replace the comedi_error() with dev_dbg() and shorten the messages
a bit.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: remove 'volatile' on private data variables
H Hartley Sweeten [Tue, 23 Apr 2013 01:34:19 +0000 (18:34 -0700)]
staging: comedi: das800: remove 'volatile' on private data variables

As indicated by checkpatch.pl, "WARNING: Use of volatile is usually
wrong: ...". The variables in the private data that are marked
volatile don't need to be. Remove the volatile.

Also, cleanup the comments to avoid > 80 char lines.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: cleanup the boardinfo
H Hartley Sweeten [Tue, 23 Apr 2013 01:34:00 +0000 (18:34 -0700)]
staging: comedi: das800: cleanup the boardinfo

For aesthetic reasons, name the enum used for the boardinfo indexes
and change them to uppercase with the prefix BOARD_.

Add some whitespace to the boardinfo declaration and use the enum
values to clarify the table.

Tidy up the das800_probe() function and only output a dev_dbg()
message if a board model is actually probed. If the user provided
the correct boardname when attaching to this driver the message
is just added noise.

For the 'default' case when checking the proded id, output the
id_bits and return -EINVAL. It should not be assumed that unknown
boards will work with this driver.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: cleanup range table declarations
H Hartley Sweeten [Tue, 23 Apr 2013 01:33:41 +0000 (18:33 -0700)]
staging: comedi: das800: cleanup range table declarations

Use the BIP_RANGE and UNI_RANGE macros to define the range
tables instead of the more generic RANGE macro.

Tidy up the whitespace of the tables.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: introduce das800_ind_{write, read}()
H Hartley Sweeten [Tue, 23 Apr 2013 01:33:22 +0000 (18:33 -0700)]
staging: comedi: das800: introduce das800_ind_{write, read}()

The GAS800_GAIN register contains some bits that enable indirect
writing to additional registers on the board through iobase + 2
and indirect reading of addition registers through iobase + 7.

Introduce some helper functions to handle the indirect register
write/read.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: remove forward declarations
H Hartley Sweeten [Tue, 23 Apr 2013 01:33:03 +0000 (18:33 -0700)]
staging: comedi: das800: remove forward declarations

Move the das800_cancel() and das800_interrupt() functions to remove
the need for the remaining forward declarations.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: move das800_set_frequency()
H Hartley Sweeten [Tue, 23 Apr 2013 01:32:43 +0000 (18:32 -0700)]
staging: comedi: das800: move das800_set_frequency()

Move das800_set_frequency() to avoid the need for the forward
declaration.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: move das800_probe()
H Hartley Sweeten [Tue, 23 Apr 2013 01:32:25 +0000 (18:32 -0700)]
staging: comedi: das800: move das800_probe()

For aesthetic reasons, move the das800_probe() function near its
only caller, das800_attach().

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: move das800_attach()
H Hartley Sweeten [Tue, 23 Apr 2013 01:32:06 +0000 (18:32 -0700)]
staging: comedi: das800: move das800_attach()

The move the das800_attach() function near the comedi_driver
declaration at the end of the file. This also removes the need
for some of the forward declarations.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: das800: move module_{init, exit} to end of file
H Hartley Sweeten [Tue, 23 Apr 2013 01:31:47 +0000 (18:31 -0700)]
staging: comedi: das800: move module_{init, exit} to end of file

The module_comedi_driver() macro provides the module_{init.exit}
code for this driver. Move the macro call and the comedi_driver
declaration to the end of the file. This also removes the need
for the das800_attach() forward declaration.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: video: imx: Add BGR666 support for parallel display
Marek Vasut [Mon, 22 Apr 2013 21:19:31 +0000 (23:19 +0200)]
staging: video: imx: Add BGR666 support for parallel display

Support the BGR666 format on the IPUv3 parallel display.

Signed-off-by: Marek Vasut <[email protected]>
Cc: Philipp Zabel <[email protected]>
Cc: Sascha Hauer <[email protected]>
Cc: Bill Pemberton <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: dwc2: add platform device bindings
Matthijs Kooijman [Mon, 22 Apr 2013 21:00:19 +0000 (14:00 -0700)]
staging: dwc2: add platform device bindings

This adds a dwc_platform.ko module that can be loaded by using
compatible = "snps,dwc2" in a device tree.

Signed-off-by: Matthijs Kooijman <[email protected]>
Signed-off-by: Paul Zimmerman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: dwc2: check for null pointer before dereferencing it
Paul Zimmerman [Mon, 22 Apr 2013 21:00:18 +0000 (14:00 -0700)]
staging: dwc2: check for null pointer before dereferencing it

We were testing qtd->urb pointer for null after we had already
dereferenced it

Reported-by: Dan Carpenter <[email protected]>
Signed-off-by: Paul Zimmerman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: dwc2: add missing newlines to debug messages
Paul Zimmerman [Mon, 22 Apr 2013 21:00:17 +0000 (14:00 -0700)]
staging: dwc2: add missing newlines to debug messages

A few debug messages were missing newlines, add them

Signed-off-by: Paul Zimmerman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: dwc2: fix potential null pointer access
Paul Zimmerman [Mon, 22 Apr 2013 21:00:16 +0000 (14:00 -0700)]
staging: dwc2: fix potential null pointer access

We were testing hsotg pointer for null after we had already
dereferenced it

Reported-by: Fengguang Wu <[email protected]>
Signed-off-by: Paul Zimmerman <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: ni_labpc: remove 'bustype' from boardinfo
H Hartley Sweeten [Mon, 22 Apr 2013 19:34:34 +0000 (12:34 -0700)]
staging: comedi: ni_labpc: remove 'bustype' from boardinfo

The 'bustype' in the boardinfo is not used. Remove it.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: ni_labpc: remove unnecessary 'bustype' check
H Hartley Sweeten [Mon, 22 Apr 2013 19:34:13 +0000 (12:34 -0700)]
staging: comedi: ni_labpc: remove unnecessary 'bustype' check

Only the ISA versions of the LabPC boards support DMA and the
devpriv->dma_chan is only set during the ISA board attach if
DMA is available. The extra check of the board->bustype is not
necessary in labpc_ai_cmd().

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: ni_labpc: pass the isr_flags to labpc_common_attach()
H Hartley Sweeten [Mon, 22 Apr 2013 19:33:53 +0000 (12:33 -0700)]
staging: comedi: ni_labpc: pass the isr_flags to labpc_common_attach()

The PCI and PCMCIA LabPC boards use shared interrupts and need the
IRQF_SHARED flag set when requesting the irq, the ISA boards do not.

Instead of checking the 'bustype' in labpc_common_attach() in order
to determine the isr_flags, just pass the flags as a parameter to the
function.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: ni_labpc: move DMA init out of the common attach
H Hartley Sweeten [Mon, 22 Apr 2013 19:33:30 +0000 (12:33 -0700)]
staging: comedi: ni_labpc: move DMA init out of the common attach

Only the ISA versions of the LabPC boards support DMA. Move the DMA
initialization out of the labpc_common_attach() and put it in the
ISA specific labpc_attach() function.

Remove the 'dma_chan' parameter from labpc_common_attach().

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi: ni_labpc: split out PCI support
H Hartley Sweeten [Mon, 22 Apr 2013 19:33:09 +0000 (12:33 -0700)]
staging: comedi: ni_labpc: split out PCI support

Currently the ni_labpc driver is used by the legacy (ISA), PCI, and
PCMCIA versions of the LabPC board. The driver is enabled under the
COMEDI_PCI_DRIVERS section of the Kconfig. This means that PCI support
must be enabled in order to use the ni_labpc driver for the PCI or
PCMCIA drivers.

Split the PCI support code out of the ni_labpc driver into a separate
driver, ni_labpc_pci. The PCMCIA support is already slip out as
ni_labpc_cs.

Modify the Kconfig so that the common code in ni_labpc is enabled by the
Kconfig option COMEDI_NI_LABPC. The ISA support code is currently still
in the ni_labpc driver but is only compiled in if COMEDI_NI_LABPC_ISA is
also enabled.

This allows the PCI and PCMCIA drivers to be enabled without the need
for the ISA stuff.

Signed-off-by: H Hartley Sweeten <[email protected]>
Reviewed-by: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: comedi/daqboard2000: use mdelay for large delays
Arnd Bergmann [Tue, 23 Apr 2013 16:30:47 +0000 (18:30 +0200)]
staging: comedi/daqboard2000: use mdelay for large delays

On ARM, it is not legal to pass values larger than 2ms into udelay(),
and mdelay() must be used instead, to avoid this build error:

ERROR: "__bad_udelay" [drivers/staging/comedi/drivers/daqboard2000.ko]
undefined!

On a related note, any use of mdelay() or large udelay() numbers should
be carefully reviewed, and replaced with msleep() or a different
implementation that does not rely on delaying the work.

Signed-off-by: Arnd Bergmann <[email protected]>
Reviewed-by: H Hartley Sweeten <[email protected]>
Cc: Ian Abbott <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging: nvec: allow modular build
Arnd Bergmann [Tue, 23 Apr 2013 16:30:46 +0000 (18:30 +0200)]
staging: nvec: allow modular build

The serio code can be a loadable module, which in turn means that nvec
also has to be a module, so mark it as "tristate" in Kconfig.

drivers/built-in.o: In function `nvec_mouse_remove':
drivers/staging/nvec/nvec_ps2.c:136: undefined reference to `serio_unregister_port'
drivers/built-in.o: In function `nvec_mouse_probe':
drivers/staging/nvec/nvec_ps2.c:126: undefined reference to `__serio_register_port'
drivers/built-in.o: In function `nvec_ps2_notifier':
drivers/staging/nvec/nvec_ps2.c:84: undefined reference to `serio_interrupt'
drivers/staging/nvec/nvec_ps2.c:91: undefined reference to `serio_interrupt'

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Marc Dietrich <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agostaging/zsmalloc: don't use pgtable-mapping from modules
Arnd Bergmann [Tue, 23 Apr 2013 16:30:48 +0000 (18:30 +0200)]
staging/zsmalloc: don't use pgtable-mapping from modules

Building zsmalloc as a module does not work on ARM because it uses
an interface that is not exported:

ERROR: "flush_tlb_kernel_range" [drivers/staging/zsmalloc/zsmalloc.ko] undefined!

Since this is only used as a performance optimization and only on ARM,
we can avoid the problem simply by not using that optimization when
building zsmalloc it is a loadable module.

flush_tlb_kernel_range is often an inline function, but out of the
architectures that use an extern function, only powerpc exports
it.

Signed-off-by: Arnd Bergmann <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Seth Jennings <[email protected]>
Cc: Nitin Gupta <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agomisc: mark spear13xx-pcie-gadget as broken
Arnd Bergmann [Tue, 23 Apr 2013 16:30:45 +0000 (18:30 +0200)]
misc: mark spear13xx-pcie-gadget as broken

This driver was merged in 2.6.38 but never actually compiled because
it depends on the <mach/pcie.h> header that has not made it into the
kernel. Starting with Linux-3.10, this results in "allyesconfig"
build errors, since spear13xx can now be enabled with the default
"multiplatform" platform on ARM. Let's mark it as broken for now.
If it doesn't get fixed, we can drop it completely.

Cc: Pratyush Anand <[email protected]>
Cc: Randy Dunlap <[email protected]>
Cc: Jesse Barnes <[email protected]>
Cc: Viresh Kumar <[email protected]>
Cc: Shiraz Hashim <[email protected]>
Signed-off-by: Arnd Bergmann <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agomei: fix krealloc() misuse in in mei_cl_irq_read_msg()
Wei Yongjun [Tue, 23 Apr 2013 02:44:35 +0000 (10:44 +0800)]
mei: fix krealloc() misuse in in mei_cl_irq_read_msg()

If krealloc() returns NULL, it doesn't free the original. So any code
of the form 'foo = krealloc(foo, ...);' is almost certainly a bug.

Introduced by commit fcb136e1ac5774909e0d85189f721b8dfa800e0f(mei: fix
reading large reposnes)

Signed-off-by: Wei Yongjun <[email protected]>
Acked-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agomei: reduce flow control only for completed messages
Tomas Winkler [Tue, 23 Apr 2013 04:38:12 +0000 (07:38 +0300)]
mei: reduce flow control only for completed messages

This fixes bug when only first chunk of a large message split
by hbuf_max_len is written to the hardware.
All the consequent chunks will not get a new credit.

A regression introduced by the commit
0ef319c93cebff9f82bdd0cdbb298f2dd00acda8
mei: streamline write complete flow function

Signed-off-by: Tomas Winkler <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agousb: phy: phy core cannot yet be a module
Arnd Bergmann [Tue, 23 Apr 2013 15:54:32 +0000 (17:54 +0200)]
usb: phy: phy core cannot yet be a module

A lot of platform code calls into the usb phy core at the moment, which
does not work if it is built as a loadable module. This will hopefully
change when those platforms are all converted to DT based probing,
but for now, the easiest solution is to change it from "tristate"
to "bool".

This solves at least these ARM allmodconfig build errors:

arch/arm/mach-imx/built-in.o: In function `imx_otg_ulpi_create':
arch/arm/mach-imx/ulpi.c:117: undefined reference to `otg_ulpi_create'
arch/arm/mach-omap2/built-in.o: In function `usbhs_init_phys':
arch/arm/mach-omap2/usb-host.c:652: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `omap_2430sdp_init':
arch/arm/mach-omap2/board-2430sdp.c:236: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `omap3_beagle_init':
arch/arm/mach-omap2/board-omap3beagle.c:554: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `devkit8000_init':
arch/arm/mach-omap2/board-devkit8000.c:596: undefined reference to `usb_bind_phy'
arch/arm/mach-omap2/built-in.o: In function `omap_ldp_init':
arch/arm/mach-omap2/board-ldp.c:379: undefined reference to `usb_bind_phy'
drivers/built-in.o: In function `ab8500_charger_probe':
drivers/power/ab8500_charger.c:3629: undefined reference to `usb_get_phy'
drivers/power/ab8500_charger.c:3706: undefined reference to `usb_put_phy'
drivers/built-in.o: In function `ab8500_charger_remove':
drivers/power/ab8500_charger.c:3411: undefined reference to `usb_put_phy'

Signed-off-by: Arnd Bergmann <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoUSB: Fix initconst in ehci driver
Andi Kleen [Mon, 22 Apr 2013 16:44:56 +0000 (09:44 -0700)]
USB: Fix initconst in ehci driver

Fix some of the initconst markings in the ehci driver(s).

Signed-off-by: Andi Kleen <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agousb-storage: CY7C68300A chips do not support Cypress ATACB
Tormod Volden [Sat, 20 Apr 2013 12:24:04 +0000 (14:24 +0200)]
usb-storage: CY7C68300A chips do not support Cypress ATACB

Many cards based on CY7C68300A/B/C use the USB ID 04b4:6830 but only the
B and C variants (EZ-USB AT2LP) support the ATA Command Block
functionality, according to the data sheets. The A variant (EZ-USB AT2)
locks up if ATACB is attempted, until a typical 30 seconds timeout runs
out and a USB reset is performed.

https://bugs.launchpad.net/bugs/428469

It seems that one way to spot a CY7C68300A (at least where the card
manufacturer left Cypress' EEPROM default vaules, against Cypress'
recommendations) is to look at the USB string descriptor indices.

A http://media.digikey.com/pdf/Data%20Sheets/Cypress%20PDFs/CY7C68300A.pdf
B http://www.farnell.com/datasheets/43456.pdf
C http://www.cypress.com/?rID=14189

Note that a CY7C68300B/C chip appears as CY7C68300A if it is running
in Backward Compatibility Mode, and if ATACB would be supported in this
case there is anyway no way to tell which chip it really is.

For 5 years my external USB drive has been locking up for half a minute
when plugged in and ata_id is run by udev, or anytime hdparm or similar
is run on it.

Finally looking at the /correct/ datasheet I think I found the reason. I
am aware the quirk in this patch is a bit hacky, but the hardware
manufacturers haven't made it easy for us.

Signed-off-by: Tormod Volden <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoUSB: serial: option: Added support Olivetti Olicard 145
Filippo Turato [Sat, 20 Apr 2013 13:04:08 +0000 (15:04 +0200)]
USB: serial: option: Added support Olivetti Olicard 145

This adds PID for Olivetti Olicard 145 in option.c

Signed-off-by: Filippo Turato <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoUSB: ftdi_sio: correct ST Micro Connect Lite PIDs
Adrian Thomasset [Tue, 23 Apr 2013 11:46:29 +0000 (12:46 +0100)]
USB: ftdi_sio: correct ST Micro Connect Lite PIDs

The current ST Micro Connect Lite uses the FT4232H hi-speed quad USB
UART FTDI chip. It is also possible to drive STM reference targets
populated with an on-board JTAG debugger based on the FT2232H chip with
the same STMicroelectronics tools.

For this reason, the ST Micro Connect Lite PIDs should be
ST_STMCLT_2232_PID: 0x3746
ST_STMCLT_4232_PID: 0x3747

Signed-off-by: Adrian Thomasset <[email protected]>
Cc: stable <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
11 years agoMerge tag 'usb-for-v3.10-part2' of git://git.kernel.org/pub/scm/linux/kernel/git...
Greg Kroah-Hartman [Tue, 23 Apr 2013 16:14:09 +0000 (09:14 -0700)]
Merge tag 'usb-for-v3.10-part2' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next

Felipe writes:

usb: urgent fixes for v3.10 merge window

Here are some late urgent fixes for v3.10 merge window.

All of these errors were introduced by recent commits
which are in linux-next.

f_obex, multi and cdc2 gadget drivers have learned to
return a proper error code when something goes wrong.

usb_bind_phy() was mistakenly placed into .init.text
section which caused Section mismatch warnings and undefined
reference compile errors.

f_source_sink had a copy-paste error which is now corrected.

g_zero got a memory leak plugged.

Two defconfigs got fixed to enable the newly introduced
CONFIG_USB_PHY.

11 years agoPCI: Remove "extern" from function declarations
Bjorn Helgaas [Thu, 18 Apr 2013 16:55:46 +0000 (10:55 -0600)]
PCI: Remove "extern" from function declarations

We had an inconsistent mix of using and omitting the "extern" keyword
on function declarations in header files.  This removes them all.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK
Bjorn Helgaas [Thu, 18 Apr 2013 00:10:07 +0000 (18:10 -0600)]
PCI: Use PCI_MSIX_TABLE_BIR, not PCI_MSIX_FLAGS_BIRMASK

PCI_MSIX_FLAGS_BIRMASK is mis-named because the BIR mask is in the
Table Offset register, not the flags ("Message Control" per spec)
register.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Drop msi_mask_reg() and remove drivers/pci/msi.h
Bjorn Helgaas [Wed, 17 Apr 2013 23:58:47 +0000 (17:58 -0600)]
PCI: Drop msi_mask_reg() and remove drivers/pci/msi.h

msi_mask_reg() doesn't provide any useful abstraction, do drop it.

Remove the now-empty drivers/pci/msi.h.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Use msix_table_size() directly, drop multi_msix_capable()
Bjorn Helgaas [Wed, 17 Apr 2013 23:44:48 +0000 (17:44 -0600)]
PCI: Use msix_table_size() directly, drop multi_msix_capable()

The users of multi_msix_capable() are really interested in the table
size, so just say what we mean.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros
Bjorn Helgaas [Wed, 17 Apr 2013 23:43:40 +0000 (17:43 -0600)]
PCI: Drop msix_table_offset_reg() and msix_pba_offset_reg() macros

msix_table_offset_reg() is used only once and adds a useless indirection,
so just use the table offset directly.

msix_pba_offset_reg() is unused, so just delete it.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Drop is_64bit_address() and is_mask_bit_support() macros
Bjorn Helgaas [Wed, 17 Apr 2013 23:42:30 +0000 (17:42 -0600)]
PCI: Drop is_64bit_address() and is_mask_bit_support() macros

is_64bit_address() and is_mask_bit_support() don't provide any useful
abstraction, so drop them.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Drop msi_data_reg() macro
Bjorn Helgaas [Wed, 17 Apr 2013 23:41:13 +0000 (17:41 -0600)]
PCI: Drop msi_data_reg() macro

msi_data_reg() doesn't provide any useful abstraction, so drop it.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros
Bjorn Helgaas [Wed, 17 Apr 2013 23:39:57 +0000 (17:39 -0600)]
PCI: Drop msi_lower_address_reg() and msi_upper_address_reg() macros

msi_lower_address_reg() and msi_upper_address_reg() don't provide any
useful abstraction, so drop them.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Drop msi_control_reg() macro and use PCI_MSI_FLAGS directly
Bjorn Helgaas [Wed, 17 Apr 2013 23:38:32 +0000 (17:38 -0600)]
PCI: Drop msi_control_reg() macro and use PCI_MSI_FLAGS directly

Note the error in pci_msix_table_size() -- we used PCI_MSI_FLAGS to
locate the PCI_MSIX_FLAGS word.  No actual breakage because PCI_MSI_FLAGS
and PCI_MSIX_FLAGS happen to be the same.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Use cached MSI/MSI-X offsets from dev, not from msi_desc
Bjorn Helgaas [Wed, 17 Apr 2013 23:34:36 +0000 (17:34 -0600)]
PCI: Use cached MSI/MSI-X offsets from dev, not from msi_desc

We always know the type (MSI vs MSI-X), so we can use the correct
cached capability offset rather than relying on the copy in the
msi_attrib.

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Clean up MSI/MSI-X capability #defines
Bjorn Helgaas [Wed, 17 Apr 2013 23:26:23 +0000 (17:26 -0600)]
PCI: Clean up MSI/MSI-X capability #defines

This doesn't change any existing symbols, but it puts them in logical
order and uses explicit masks instead of shifts, like the rest of the
file.

It also adds new symbols for PCI_MSIX_TABLE_BIR,
PCI_MSIX_TABLE_OFFSET, PCI_MSIX_PBA_BIR, and PCI_MSIX_PBA_OFFSET to
replace the mis-named PCI_MSIX_FLAGS_BIRMASK (the BAR index fields
are part of the Table and PBA registers, not the flags register).

Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Use cached MSI-X cap while enabling MSI-X
Gavin Shan [Thu, 4 Apr 2013 16:54:33 +0000 (16:54 +0000)]
PCI: Use cached MSI-X cap while enabling MSI-X

The patch uses the cached MSI-X capability offset in
pci_dev instead of reading it from config space when enabling
MSI-X interrupts.

Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Use cached MSI cap while enabling MSI interrupts
Gavin Shan [Thu, 4 Apr 2013 16:54:32 +0000 (16:54 +0000)]
PCI: Use cached MSI cap while enabling MSI interrupts

The patch uses the cached MSI capability offset in pci_dev instead
of reading it from config space when enabling MSI interrupts.

[bhelgaas: removed unrelated msi_control_reg() changes]
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Remove MSI/MSI-X cap check in pci_msi_check_device()
Gavin Shan [Thu, 4 Apr 2013 16:54:31 +0000 (16:54 +0000)]
PCI: Remove MSI/MSI-X cap check in pci_msi_check_device()

The function pci_msi_check_device() is called while enabling MSI
or MSI-X interrupts to make sure the PCI device can support MSI
or MSI-X capability.  This patch removes the check on MSI or MSI-X
capability in the function and lets the caller do the check.

Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Cache MSI/MSI-X capability offsets in struct pci_dev
Gavin Shan [Thu, 4 Apr 2013 16:54:30 +0000 (16:54 +0000)]
PCI: Cache MSI/MSI-X capability offsets in struct pci_dev

The patch caches the MSI and MSI-X capability offset in PCI device
(struct pci_dev) so that we needn't read it from the config space
upon enabling or disabling MSI or MSI-X interrupts.

[bhelgaas: moved pm_cap size change to separate patch]
Signed-off-by: Gavin Shan <[email protected]>
Signed-off-by: Bjorn Helgaas <[email protected]>
11 years agoPCI: Use u8, not int, for PM capability offset
Bjorn Helgaas [Wed, 17 Apr 2013 22:57:56 +0000 (16:57 -0600)]
PCI: Use u8, not int, for PM capability offset

The Power Management Capability (PCI_CAP_ID_PM == 0x01) is defined by PCI
and must appear in the 256-byte PCI Configuration Space from 0-0xff.  It
cannot be in the PCIe Extended Configuration space from 0x100-0xfff, so
we only need a u8 to hold its offset.

Signed-off-by: Bjorn Helgaas <[email protected]>
Acked-by: Rafael J. Wysocki <[email protected]>
11 years agopinctrl: s3c64xx: Fix build error caused by undefined chained_irq_enter
Tomasz Figa [Tue, 16 Apr 2013 22:23:59 +0000 (00:23 +0200)]
pinctrl: s3c64xx: Fix build error caused by undefined chained_irq_enter

Commit de88cbb7 moved definitions of chained_irq_enter and
chained_irq_exit to a generic header, which must be now included instead
of the legacy arch-specific one.

This patch fixes build error caused by including the legacy header
leading to undefined chained_irq_enter and chained_irq_exit symbols.

Signed-off-by: Tomasz Figa <[email protected]>
Signed-off-by: Linus Walleij <[email protected]>
This page took 0.11036 seconds and 4 git commands to generate.