Age | Commit message (Collapse) | Author |
|
Signed-off-by: Ron Mercer <ron.mercer@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The enc28j60 driver doesn't check whether the length of the packet as reported
by the hardware fits into the preallocated buffer. When stressed, the hardware
may report insanely large packets even tough the "Receive OK" bit is set. Fix
this.
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Correct two typos.
Signed-off-by: Roel Kluin <roel.kluin@gmail.com>
Acked-by: Karsten Keil <kkeil@suse.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Firmware blob is big endian
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Firmware blob looks like this...
u8 firmware_major
u8 firmware_minor
u8 firmware_fix
u8 pad
__be32 start_address
__be32 length (total, including BSS sections to be zeroed)
data... (in __be32 words, which is native for the firmware)
Signed-off-by: Jaswinder Singh Rajput <jaswinderrajput@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
We store the firmware in its native big-endian form now, so the loop in
ace_copy() is modified to use be32_to_cpup() when writing it out.
We can forget the BSS,SBSS sections of the firmware, since we were
clearing all the device's RAM anyway. And the text,rodata,data sections
can all be loaded as a single chunk since they're contiguous (give or
take a few dozen bytes in between).
Signed-off-by: Jaswinder Singh <jaswinder@infradead.org>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Acked-by: Jes Sorensen <jes@sgi.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Add standard interfaces for alarm/update irqs enabling. Drivers are no
more required to implement equivalent ioctl code as rtc-dev will provide
it.
UIE emulation should now be handled correctly and will work even for those
RTC drivers who cannot be configured to do both UIE and AIE.
Signed-off-by: Alessandro Zummo <a.zummo@towertech.it>
Cc: David Brownell <david-b@pacbell.net>
Cc: Atsushi Nemoto <anemo@mba.ocn.ne.jp>
Cc: Ralf Baechle <ralf@linux-mips.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
The function viafb_cursor() uses 2 stack-variables of CURSOR_SIZE bits;
CURSOR_SIZE is defined as (8 * 1024). Using up twice 1k on stack is too
much for 4k-stack (though it works with 8k-stacks). Make those two
variables kzalloc'ed to preserve stack space.
Also merge the whole lot of local struct's in viafb_ioctl into a union so
the stack usage gets minimized here as well. (struct's are only accessed
in their indicidual IOCTL case) This second part is only compile-tested as
I know of no userspace app using the IOCTLs.
Signed-off-by: Bruno Prémont <bonbons@linux-vserver.org>
Cc: <JosephChan@via.com.tw>
Cc: Krzysztof Helt <krzysztof.h1@poczta.fm>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
|
The subdevice removal functions are marked __devexit but are referenced
from the error handling path when probing so are needed even when
__devexit functions are removed.
Signed-off-by: Mark Brown <broonie@sirena.org.uk>
Acked-by: Eric Miao <eric.miao@marvell.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
ove the menelaus driver from drivers/i2c/chips to drivers/mfd
since it's more of a multi-function device than anything else,
and since Jean is trying to vanish drivers/i2c/chips ASAP.
One way to think of these chips are as the PMIC family most
used with OMAP2 generation chips.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Move the tps65010 driver from drivers/i2c/chips to drivers/mfd
since it's more of a multi-function device than anything else,
and since Jean is trying to vanish drivers/i2c/chips ASAP.
One way to think of these chips are as the PMIC family most
used with OMAP1 generation chips.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Basic MFD framework for the MSP430 microcontroller firmware used
on the dm355evm board:
- Provides an interface for other drivers: register read/write
utilities, and register declarations.
- Directly exports:
* Many signals through the GPIO framework
+ LEDs
+ SW6 through gpio sysfs
+ NTSC/nPAL jumper through gpio sysfs
+ ... more could be added later, e.g. MMC signals
* Child devices:
+ LEDs, via leds-gpio child (and default triggers)
+ RTC, via rtc-dm355evm child device
+ Buttons and IR control, via dm355evm_keys
- Supports power-off system call. Use the reset button to power
the board back up; the power supply LED will be on, but the
MSP430 waits to re-activate the regulators.
- On probe() this:
* Announces firmware revision
* Turns off the banked LEDs
* Exports the resources noted above
* Hooks the power-off support
* Muxes tvp5146 -or- imager for video input
Unless the new tvp514x driver (tracked for mainline) is configured,
this assumes that some custom imager driver handles video-in.
This completely ignores the registers reporting the output voltages
on the various power supplies. Someone could add a hwmon interface
if that seems useful.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
The WM8351 is a WM8350 variant. As well as register default changes the
WM8351 has fewer voltage and current regulators than the WM8350.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Some WM8350 variants have fewer DCDCs and ISINKs. Identify these at
probe and refuse to use the absent DCDCs when running on these chips.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
The WM8352 is a variant of the WM8350. Aside from the register defaults
there are no software visible differences to the WM8350.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
The global irq_desc array is soon going to be accessible only with
!CONFIG_SPARSE_IRQ. We should start using the generic irq_to_desc()
routines instead.
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Driver for battery charger integrated into Dialog Semiconductor DA9030 PMIC
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
This patch amends DA903x MFD driver with definitions and methods
needed for battery charger driver.
Signed-off-by: Mike Rapoport <mike@compulab.co.il>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Register a child device for the codec in the WM8400.
Also switch the unregistration of the MFD devices to use the MFD core
since the current code is hand rolling the same thing.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
The MFD cell structure provides a driver_data field but doesn't pass it
on to the child devices when instantiating them - do that.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
This is a fix for:
twl4030-core.c:(.text+0x16a797): undefined reference to `clk_get_rate'
twl4030-core.c:(.text+0x16a797): undefined reference to `clk_put'
on x86 and x86_64, as the clock API is not defined on those platforms.
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
This contains two bugfixes to the initial twl4030 regulator
support patch related to USB:
(a) always overwrite the old list of consumers ... else
the regulator handles all use the same "usb1v5" name;
(b) don't set up the "usbcp" regulator, which turns out
to be managed through separate controls, usually ULPI
directly from the OTG controller.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Initial code to create twl4030 voltage regulator devices, using
the new regulator framework. Note that this now starts to care
what name is used to declare the TWL chip:
- TWL4030 is the "old" chip; newer ones have a bigger variety
of VAUX2 voltages.
- TWL5030 is the core "new" chip; TPS65950 is its catalog version.
- The TPS65930 and TPS65920 are cost-reduced catalog versions of
TWL5030 parts ... fewer regulators, no battery charger, etc.
Board-specific regulator configuration should be provided, listing
which regulators are used and their constraints (e.g. 1.8V only).
Code that could ("should"?) leverage the regulator stuff includes
TWL4030 USB transceiver support and MMC glue, LCD support for the
3430SDP and Labrador boards, and S-Video output.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Finish removing dependency of TWL driver stack on platform-specific
IRQ definitions ... and remove the build dependency on OMAP.
This lets the TWL4030 code be included in test builds for most
platforms, and will make it easier for non-OMAP folk to update
most of this code for new APIs etc.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Minor cleanup to twl4030-core: define a helper function to populate
a single child node, and use it to replace six inconsistent versions
of the same logic. Both object and source code shrink.
As part of this, some devices now have more IRQ resources: battery
charger, keypad, ADC, and USB transceiver. That helps to remove some
irq #defines that block the children's drivers code from compiling on
non-OMAP platforms.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Implement support for reporting battery health in the WM8350 battery
interface. Since we are now able to report this via the classs remove
the diagnostics from the interrupt handler.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Some systems are able to report problems with batteries being under
temperature.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Since the WM8350 driver was originally written the semantics for the
identification registers of the chip have been clarified, allowing
us to do an exact match on all the fields. This avoids mistakenly
running on unsupported hardware.
Also change to using the datasheet names more consistently for
legibility and fix a printk() that should be dev_err().
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Rather than check for chip revisions in the WM8350 drivers have the core
code set flags for relevant differences.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
This patch adds support for the PMU provided by the WM8350 which
implements battery, line and USB supplies including a battery charger.
The hardware functions largely autonomously, with minimal software
control required to initiate fast charging.
Support for configuration of the USB supply is not yet implemented.
This means that the hardware will remain in the mode configured at
startup, by default limiting the current drawn from USB to 100mA.
This driver was originally written by Liam Girdwood with subsequent
updates for submission by Mark Brown.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Acked-by: Anton Vorontsov <cbouatmailru@gmail.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Minor change to the TWL4030 utility interface: support reads
of all 256 bytes in each register bank (vs just 255). This
can help when debugging, but is otherwise a NOP.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
The auxiliary ADC in the WM8350 is shared between several subdevices
so access to it needs to be arbitrated by the core driver.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
No other software changes are required.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Hopefully this will make the purpose of these functions a bit clearer,
it's not immediately obvious that the lock is a hardware feature.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
There's no need to read this back from the chip each time.
Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Samuel Ortiz <sameo@openedhand.com>
|
|
Conflicts:
drivers/hid/hid-ids.h
|
|
sony_set_operational() only propagates return value from
usb_control_msg(), which returns negative on error and number
of transferred bytes otherwise.
Reported-by: Marcin Tolysz <tolysz@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
The hidraw subsystem has a bug that prevents the close syscall from ever
reaching the low level driver, leading to a resource leak. Fix by replacing
postdecrement with predecrement.
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
The Genius PenSketch 12x9 tablet has a puck (labeled a
"Tablet Mouse") in addition to a pen. Without registering a quirk
the tablet appears to be a single input device that reports the
wrong axis information in /proc/bus/input/devices, and sends
incorrect events (e.g. ABS_Z instead of ABS_Y). This information
confuses the X evdev driver and makes the device impossible to
use.
The quirk fixes events and splits the device into multiple input
event devices so that at least the puck is useful.
Signed-off-by: Matt Helsley <matt.helsley@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
This device is already handled by radio-si470x driver, and we therefore
want usbhid to ignore it. Patch places usb ids of that device in
ignore section of hid-core.c
Signed-off-by: Alexey Klimov <klimov.linux@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
Make default setting for TopSpeed driver compliant with the defaults
of the other specialized HID drivers.
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
I recently picked up a Cyberlink branded remote control produced
by TopSeed Tech Corp. Alas, it appears that this device is using
non-standard mappings for some of it's keys (Usage page 0xffbc).
Signed-off-by: Lev Babiev <harley@hosers.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
The usbmouse and usbkbd modules are not supposed to be used with regular USB
mice and keyboards. Make them depend on EMBEDDED to prevent them from being
built and loaded on non-EMBEDDED configs.
Signed-off-by: Parag Warudkar <parag.lkml@gmail.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
This is a cleanup of hiddev and fixes the following issues:
- thread safety by locking in read & ioctl, introducing a per device mutex
- race between ioctl and disconnect, introducing a flag and locking
in form of a per low level device mutex
- race between open and other methods, making sure only successfully
opened devices are put on the list, changing order of events
- range checking both upper and lower limits of the minor range
- make sure further calls to open fail for unplugged devices even if
the device still has opened files
- error checking for low level open
- possible loss of wakeup events, using standard waiting macros
- race in initialisation by moving registration after full initialisation
Signed-off-by: Oliver Neukum <oneukum@suse.de>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
I have implemented Force Feedback driver for another "GreeAsia" based device
(0e8f:0012 "GreenAsia Inc. USB Joystick"). The functionality was tested with
MANTA Warior MM816 and SpeedLink Strike2 SL-6635 and fftest software -
everything seems to work right.
Signed-off-by: Lukasz Lubojanski <lukasz@lubojanski.info>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
Fix the obnoxious "default y" for all the "special" HID code, which forces folk
with EMBEDDED defined to manually override that inappropriate default for
almost 20 choices. The general policy is against "default y"; it should apply
here too.
Signed-off-by: David Brownell <dbrownell@users.sourceforge.net>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|
|
We need to properly set parent of the hidraw device (which is the
corresponding physical device itself) in order to hidraw devices not
end up under virtual device tree.
Reported-by: Kay Sievers <kay.sievers@vrfy.org>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>
|