]> Git Repo - linux.git/log
linux.git
13 years agoacer-wmi: check the existence of internal 3G device when set capability
Lee, Chun-Yi [Sat, 21 May 2011 23:33:52 +0000 (07:33 +0800)]
acer-wmi: check the existence of internal 3G device when set capability

That will be better to check the existence of internal 3G device when
we set threeg capability and generate killswitch for threeg. It can
avoid userland access 3G rfkill but the machine doesn't have internal
3G device.

Reference: bko#32862
https://bugzilla.kernel.org/show_bug.cgi?id=32862

Tested on Acer Aspire 8930G, Acer Travelmate 8572

Tested-by: Hector Martin <[email protected]>
Cc: Carlos Corbacho <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Corentin Chary <[email protected]>
Cc: Thomas Renninger <[email protected]>
Signed-off-by: Lee, Chun-Yi <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoplatform/x86:delete two unused variables
Weiping Pan [Mon, 16 May 2011 06:49:47 +0000 (14:49 +0800)]
platform/x86:delete two unused variables

variable handle is not used in these two functions,
just delete them.

Signed-off-by: Weiping Pan <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agosupport wlan hotkey on Acer Travelmate 5735Z
Melchior FRANZ [Tue, 24 May 2011 08:35:55 +0000 (10:35 +0200)]
support wlan hotkey on Acer Travelmate 5735Z

On an Acer Travelmate 5735Z-452G32Mnss the WLAN-enable/disable key
doesn't send 0x1 as acpi event key code, but 0x3. This patch also
makes the module ignore hotkey acpi events for functions that are
already handled without. This avoids warning message "keyboard:
can't emulate rawmode for keycode 240".

Signed-off-by: Melchior FRANZ <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoplatform-x86: intel_mid_thermal: Fix memory leak
Ameya Palande [Thu, 7 Apr 2011 13:30:02 +0000 (16:30 +0300)]
platform-x86: intel_mid_thermal: Fix memory leak

Signed-off-by: Ameya Palande <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoplatform/x86: Fix Makefile for intel_mid_powerbtn
Ameya Palande [Wed, 6 Apr 2011 14:45:03 +0000 (17:45 +0300)]
platform/x86: Fix Makefile for intel_mid_powerbtn

Signed-off-by: Ameya Palande <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoplatform/x86: Simplify intel_mid_powerbtn
Ameya Palande [Wed, 6 Apr 2011 14:44:37 +0000 (17:44 +0300)]
platform/x86: Simplify intel_mid_powerbtn

This patch:
1. Removes unnecessay #defines
2. Removes 'mfld_pb_priv' data structure which results in simpler error
   handling and less memory allocations.

Signed-off-by: Ameya Palande <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoacer-wmi: Delete out-of-date documentation
Carlos Corbacho [Mon, 2 May 2011 08:57:23 +0000 (09:57 +0100)]
acer-wmi: Delete out-of-date documentation

The documentation file for acer-wmi is long out of date, and there's not
much point in keeping it around either.

Signed-off-by: Carlos Corbacho <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoacerhdf: Clean up includes
Jean Delvare [Sun, 24 Apr 2011 16:07:55 +0000 (18:07 +0200)]
acerhdf: Clean up includes

* The acerhdf driver isn't an ACPI driver, so it needs not include
  <acpi/acpi_drivers.h>. All it uses is ec_read() and ec_write(), for
  which <linux/acpi.h> is sufficient.
* I couldn't find any reason why <linux/fs.h> and <linux/sched.h> were
  included.

This should avoid unneeded rebuilds of the acerhdf driver.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Peter Feuerer <[email protected]>
Cc: Matthew Garrett <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoacerhdf: Drop pointless dependency on THERMAL_HWMON
Jean Delvare [Sun, 24 Apr 2011 09:00:08 +0000 (11:00 +0200)]
acerhdf: Drop pointless dependency on THERMAL_HWMON

The THERMAL_HWMON config option simply exposes the thermal zone
temperature values and limits to user-space. It makes no sense for a
kernel driver to depend on this.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Peter Feuerer <[email protected]>
Cc: Matthew Garrett <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoacer-wmi: Update MAINTAINERS
Carlos Corbacho [Mon, 2 May 2011 08:57:18 +0000 (09:57 +0100)]
acer-wmi: Update MAINTAINERS

I don't have the time or much interest these days in maintaining acer-wmi, as I
don't have access to newer Acer hardware. As he's been doing most of the work
these days anyway, Joey Lee has kindly agreed to take over.

Signed-off-by: Carlos Corbacho <[email protected]>
Cc: Joey Lee <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agowmi: Orphan ACPI-WMI driver
Carlos Corbacho [Mon, 2 May 2011 08:57:13 +0000 (09:57 +0100)]
wmi: Orphan ACPI-WMI driver

I no longer have the time to work on this, and haven't really been doing any
work to this either. Time to let someone else take the reins.

Signed-off-by: Carlos Corbacho <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agotc1100-wmi: Orphan driver
Carlos Corbacho [Mon, 2 May 2011 08:57:08 +0000 (09:57 +0100)]
tc1100-wmi: Orphan driver

I've never owned the hardware, this was a port of an existing driver to prove
that the ACPI-WMI code was useful to more than just acer-wmi.

Signed-off-by: Carlos Corbacho <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoacer-wmi: does not allow negative number set to initial device state
Lee, Chun-Yi [Fri, 15 Apr 2011 10:42:47 +0000 (18:42 +0800)]
acer-wmi: does not allow negative number set to initial device state

The driver set module parameter value: mailled, threeg and brightness
to BIOS by evaluate wmi method when driver was initialed. The default
values for those parameters are -1, so, that will be better don't set
negative value to BIOS.

Cc: Carlos Corbacho <[email protected]>
Cc: Matthew Garrett <[email protected]>
Cc: Dmitry Torokhov <[email protected]>
Cc: Corentin Chary <[email protected]>
Signed-off-by: Lee, Chun-Yi <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoplatform/oaktrail: ACPI EC Extra driver for Oaktrail
Yin Kangkai [Wed, 6 Apr 2011 14:05:24 +0000 (15:05 +0100)]
platform/oaktrail: ACPI EC Extra driver for Oaktrail

This driver implements an Extra ACPI EC driver for products based on Intel
Oaktrail platform.

This driver does below things:
1. registers itself in the Linux backlight control in
   /sys/class/backlight/intel_oaktrail/

2. registers in the rfkill subsystem here: /sys/class/rfkill/rfkillX/
   for these components: wifi, bluetooth, wwan (3g), gps

Signed-off-by: Yin Kangkai <[email protected]>
[Extracted from a bigger patch by Yin Kangkai, this version leaves out some
 sysfs bits that probably want to be driver managed, and ACPI i2c enumeration]

Signed-off-by: Alan Cox <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agothinkpad_acpi: Convert printks to pr_<level>
Joe Perches [Mon, 4 Apr 2011 17:06:25 +0000 (10:06 -0700)]
thinkpad_acpi: Convert printks to pr_<level>

Add pr_fmt.
Removed local TPACPI_<level> #defines, convert to pr_<level>.
Neaten dbg_<foo> macros.
Added a few missing newlines to logging messages.
Added static inline str_supported for !CONFIG_THINKPAD_ACPI_DEBUG vdbg_printk
defect reported by Sedat Dilek <[email protected]>.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agothinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning
Joe Perches [Mon, 4 Apr 2011 17:06:24 +0000 (10:06 -0700)]
thinkpad_acpi: Correct !CONFIG_THINKPAD_ACPI_VIDEO warning

Move TPACPI_HANDLE declaration into #ifdef block
and neaten it a bit.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoplatform-x86: intel_mid_thermal: Fix coding style
Ameya Palande [Fri, 1 Apr 2011 13:54:11 +0000 (16:54 +0300)]
platform-x86: intel_mid_thermal: Fix coding style

Before fixing checkpatch.pl reported 74 errors and 234 warnings

Signed-off-by: Ameya Palande <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoxo15-ebook: Use pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:54 +0000 (15:21 -0700)]
xo15-ebook: Use pr_<level>

Use the current logging styles.

Remove local #define PREFIX.
Add pr_fmt.
Convert printk to pr_<level>.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agowmi: Removed trailing whitespace from logging message.
Joe Perches [Tue, 29 Mar 2011 22:21:53 +0000 (15:21 -0700)]
wmi: Removed trailing whitespace from logging message.

Just neatening.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agotoshiba: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:52 +0000 (15:21 -0700)]
toshiba: Convert printks to pr_<level>

Add pr_fmt.
Remove local MY_<foo> #defines.
Convert printks to pr_<level>.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agotopstar-laptop: Convert remaining printk to pr_info
Joe Perches [Tue, 29 Mar 2011 22:21:51 +0000 (15:21 -0700)]
topstar-laptop: Convert remaining printk to pr_info

To be similar to all other uses.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agotc1100-wmi: Add pr_fmt, use pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:49 +0000 (15:21 -0700)]
tc1100-wmi: Add pr_fmt, use pr_<level>

Use the more normal logging styles.
Removed now unused local logging #defines.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agosony-laptop: Add and use #define pr_fmt
Joe Perches [Tue, 29 Mar 2011 22:21:48 +0000 (15:21 -0700)]
sony-laptop: Add and use #define pr_fmt

Add pr_fmt.
Remove now unused #define DRV_PRX.
Neaten dprintk macro.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agomsi-wmi: Use pr_fmt and pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:47 +0000 (15:21 -0700)]
msi-wmi: Use pr_fmt and pr_<level>

Added pr_fmt.
Removed now unused #define DRV_PFX
Convert dprintk to pr_debug.
Convert printks to pr_<level>.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agomsi-laptop: pr_<level> neatening
Joe Perches [Tue, 29 Mar 2011 22:21:46 +0000 (15:21 -0700)]
msi-laptop: pr_<level> neatening

Just making it a bit more like other logging message uses.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agointel_pmic_gpio: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:45 +0000 (15:21 -0700)]
intel_pmic_gpio: Convert printks to pr_<level>

Add #define pr_fmt(fmt) "%s: " fmt, __func__
to prefix function name to each output message.
Convert printks to pr_<level>.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agointel_menlow: Add pr_fmt and use pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:44 +0000 (15:21 -0700)]
intel_menlow: Add pr_fmt and use pr_<level>

Add pr_fmt to prefix the logging messages.
Convert printk to pr_<level>.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoideapad-laptop: Add pr_fmt
Joe Perches [Tue, 29 Mar 2011 22:21:43 +0000 (15:21 -0700)]
ideapad-laptop: Add pr_fmt

Add pr_fmt to prefix logging messages.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoibm_rtl: Use pr_fmt and pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:42 +0000 (15:21 -0700)]
ibm_rtl: Use pr_fmt and pr_<level>

Remove hard coded prefixes from logging messages.
Neaten RTL_DEBUG macro and uses.
Convert __FUNCTION__ to __func__.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agohp-wmi: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:41 +0000 (15:21 -0700)]
hp-wmi: Convert printks to pr_<level>

Added pr_fmt and converted printks to pr_<level>.
Removed now unused PREFIX and UNIMPL #defines.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agohdaps: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:40 +0000 (15:21 -0700)]
hdaps: Convert printks to pr_<level>

Added pr_fmt, converted printks and removed
hard coded prefixes.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agofujitsu-laptop: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:39 +0000 (15:21 -0700)]
fujitsu-laptop: Convert printks to pr_<level>

Added pr_fmt, converted printks and removed
hard coded prefixes.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoeeepc: Use pr_warn
Joe Perches [Tue, 29 Mar 2011 22:21:38 +0000 (15:21 -0700)]
eeepc: Use pr_warn

Just a trivial pr_warning to pr_warn conversion
while adding a few missing newlines.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agodell: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:37 +0000 (15:21 -0700)]
dell: Convert printks to pr_<level>

Add pr_fmt.
Remove hard coded prefixes and use pr_<level>.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agocompal-laptop: Convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:36 +0000 (15:21 -0700)]
compal-laptop: Convert printks to pr_<level>

Add pr_fmt.
Convert printks to pr_<level> removing DRIVER_NAME prefix.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoasus: Add pr_fmt and convert printks to pr_<level>
Joe Perches [Tue, 29 Mar 2011 22:21:35 +0000 (15:21 -0700)]
asus: Add pr_fmt and convert printks to pr_<level>

Add pr_fmt, prefixes each log message.
Convert printks to pr_<level>.
Convert pr_warning to pr_warn.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoacer-wmi: pr_<level> cleanups
Joe Perches [Tue, 29 Mar 2011 22:21:34 +0000 (15:21 -0700)]
acer-wmi: pr_<level> cleanups

Convert pr_warning to pr_warn.
Add some missing newlines to pr_<level> uses.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoibm_rtl: Remove warnings from casts of pointer to int
Joe Perches [Tue, 29 Mar 2011 22:21:33 +0000 (15:21 -0700)]
ibm_rtl: Remove warnings from casts of pointer to int

Just print them as %p.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoasus-wmi: Remove __init from asus_wmi_platform_init
Joe Perches [Tue, 29 Mar 2011 22:21:32 +0000 (15:21 -0700)]
asus-wmi: Remove __init from asus_wmi_platform_init

It's used by a non-init function.

Signed-off-by: Joe Perches <[email protected]>
Signed-off-by: Matthew Garrett <[email protected]>
13 years agoGPIO: OMAP: move to drivers/gpio
Kevin Hilman [Fri, 20 May 2011 09:53:37 +0000 (11:53 +0200)]
GPIO: OMAP: move to drivers/gpio

Move OMAP GPIO driver to drivers/gpio.  Builds whenever
CONFIG_ARCH_OMAP=y.

Signed-off-by: Kevin Hilman <[email protected]>
13 years agoGPIO: OMAP: move register offset defines into <plat/gpio.h>
Kevin Hilman [Wed, 20 Apr 2011 22:44:11 +0000 (15:44 -0700)]
GPIO: OMAP: move register offset defines into <plat/gpio.h>

Register offset defines are moved to <plat/gpio.h> so they can be used
by SoC-specific device init code to fill out platform_data register
offsets.

Signed-off-by: Kevin Hilman <[email protected]>
13 years ago[CIFS] Fix endian error comparing authusers when cifsacl enabled
Steve French [Fri, 27 May 2011 15:19:12 +0000 (15:19 +0000)]
[CIFS] Fix endian error comparing authusers when cifsacl enabled

Fix sparse warning:
 CHECK   fs/cifs/cifsacl.c
fs/cifs/cifsacl.c:41:36: warning: incorrect type in initializer
(different base types)
fs/cifs/cifsacl.c:41:36:    expected restricted __le32
fs/cifs/cifsacl.c:41:36:    got int
fs/cifs/cifsacl.c:461:52: warning: restricted __le32 degrades to integer
fs/cifs/cifsacl.c:461:73: warning: restricted __le32 degrades to integer

The second one looks harmless but the first one (sid_authusers)
was added in commit 2fbc2f1729e785a7b2faf9d8d60926bb1ff62af0
and only affects 2.6.38/2.6.39

CC: Stable <[email protected]>
Reviewed-and-Tested-by: Shirish Pargaonkar <[email protected]>
Signed-off-by: Steve French <[email protected]>
13 years agoarch/tile: more /proc and /sys file support
Chris Metcalf [Thu, 26 May 2011 16:40:09 +0000 (12:40 -0400)]
arch/tile: more /proc and /sys file support

This change introduces a few of the less controversial /proc and
/proc/sys interfaces for tile, along with sysfs attributes for
various things that were originally proposed as /proc/tile files.
It also adjusts the "hardwall" proc API.

Arnd Bergmann reviewed the initial arch/tile submission, which
included a complete set of all the /proc/tile and /proc/sys/tile
knobs that we had added in a somewhat ad hoc way during initial
development, and provided feedback on where most of them should go.

One knob turned out to be similar enough to the existing
/proc/sys/debug/exception-trace that it was re-implemented to use
that model instead.

Another knob was /proc/tile/grid, which reported the "grid" dimensions
of a tile chip (e.g. 8x8 processors = 64-core chip).  Arnd suggested
looking at sysfs for that, so this change moves that information
to a pair of sysfs attributes (chip_width and chip_height) in the
/sys/devices/system/cpu directory.  We also put the "chip_serial"
and "chip_revision" information from our old /proc/tile/board file
as attributes in /sys/devices/system/cpu.

Other information collected via hypervisor APIs is now placed in
/sys/hypervisor.  We create a /sys/hypervisor/type file (holding the
constant string "tilera") to be parallel with the Xen use of
/sys/hypervisor/type holding "xen".  We create three top-level files,
"version" (the hypervisor's own version), "config_version" (the
version of the configuration file), and "hvconfig" (the contents of
the configuration file).  The remaining information from our old
/proc/tile/board and /proc/tile/switch files becomes an attribute
group appearing under /sys/hypervisor/board/.

Finally, after some feedback from Arnd Bergmann for the previous
version of this patch, the /proc/tile/hardwall file is split up into
two conceptual parts.  First, a directory /proc/tile/hardwall/ which
contains one file per active hardwall, each file named after the
hardwall's ID and holding a cpulist that says which cpus are enclosed by
the hardwall.  Second, a /proc/PID file "hardwall" that is either
empty (for non-hardwall-using processes) or contains the hardwall ID.

Finally, this change pushes the /proc/sys/tile/unaligned_fixup/
directory, with knobs controlling the kernel code for handling the
fixup of unaligned exceptions.

Reviewed-by: Arnd Bergmann <[email protected]>
Signed-off-by: Chris Metcalf <[email protected]>
13 years agoBtrfs: use the device_list_mutex during write_dev_supers
Chris Mason [Fri, 27 May 2011 14:03:58 +0000 (10:03 -0400)]
Btrfs: use the device_list_mutex during write_dev_supers

write_dev_supers was changed to use RCU to protect the list of
devices, but it was then sleeping while it actually wrote the supers.
This fixes it to just use the mutex, since we really don't any
concurrency in write_dev_supers anyway.

Signed-off-by: Chris Mason <[email protected]>
13 years agofs: cosmetic inode.c cleanups
Christoph Hellwig [Fri, 27 May 2011 13:28:01 +0000 (09:28 -0400)]
fs: cosmetic inode.c cleanups

Move the lock order description after all the includes, remove several
fairly outdated and/or incorrect comments, move Andrea's
copyright/changelog to the top where it belongs, remove the pointless
filename in the top of the file comment, and remove to useless macros.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Al Viro <[email protected]>
13 years agovfs: Improve the bio_add_page() and bio_add_pc_page() descriptions
Andreas Gruenbacher [Fri, 27 May 2011 12:52:09 +0000 (14:52 +0200)]
vfs: Improve the bio_add_page() and bio_add_pc_page() descriptions

The descriptions of bio_add_page() and bio_add_pc_page() are slightly
inconsistent; improve them.

Signed-off-by: Andreas Gruenbacher <[email protected]>
Signed-off-by: Al Viro <[email protected]>
13 years agoxattr: Fix error results for non-existent / invisible attributes
Andreas Gruenbacher [Fri, 27 May 2011 12:50:36 +0000 (14:50 +0200)]
xattr: Fix error results for non-existent / invisible attributes

Return -ENODATA when trying to read a user.* attribute which cannot
exist: user space otherwise does not have a reasonable way to
distinguish between non-existent and inaccessible attributes.

Likewise, return -ENODATA when an unprivileged process tries to read a
trusted.* attribute: to unprivileged processes, those attributes are
invisible (listxattr() won't include them).

Related to this bug report: https://bugzilla.redhat.com/660613

Signed-off-by: Andreas Gruenbacher <[email protected]>
Signed-off-by: Al Viro <[email protected]>
13 years agoMerge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/roste...
Ingo Molnar [Fri, 27 May 2011 12:28:09 +0000 (14:28 +0200)]
Merge branch 'tip/perf/urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rostedt/linux-2.6-trace into perf/urgent

13 years agoMerge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile...
Ingo Molnar [Fri, 27 May 2011 12:08:09 +0000 (14:08 +0200)]
Merge branch 'urgent' of git://git.kernel.org/pub/scm/linux/kernel/git/rric/oprofile into perf/urgent

13 years agoIPVS: bug in ip_vs_ftp, same list heaad used in all netns.
Hans Schillstrom [Tue, 24 May 2011 12:11:05 +0000 (14:11 +0200)]
IPVS: bug in ip_vs_ftp, same list heaad used in all netns.

When ip_vs was adapted to netns the ftp application was not adapted
in a correct way.
However this is a fix to avoid kernel errors. In the long term another solution
might be chosen.  I.e the ports that the ftp appl, uses should be per netns.

Signed-off-by: Hans Schillstrom <[email protected]>
Acked-by: Julian Anastasov <[email protected]>
Signed-off-by: Pablo Neira Ayuso <[email protected]>
13 years agofs: pass exact type of data dirties to ->dirty_inode
Christoph Hellwig [Fri, 27 May 2011 10:53:02 +0000 (06:53 -0400)]
fs: pass exact type of data dirties to ->dirty_inode

Tell the filesystem if we just updated timestamp (I_DIRTY_SYNC) or
anything else, so that the filesystem can track internally if it
needs to push out a transaction for fdatasync or not.

This is just the prototype change with no user for it yet.  I plan
to push large XFS changes for the next merge window, and getting
this trivial infrastructure in this window would help a lot to avoid
tree interdependencies.

Also remove incorrect comments that ->dirty_inode can't block.  That
has been changed a long time ago, and many implementations rely on it.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Al Viro <[email protected]>
13 years agoLift the check for automount points into do_lookup()
Al Viro [Fri, 27 May 2011 11:03:15 +0000 (07:03 -0400)]
Lift the check for automount points into do_lookup()

Signed-off-by: Al Viro <[email protected]>
13 years agoTrim excessive arguments of follow_mount_rcu()
Al Viro [Fri, 27 May 2011 10:53:39 +0000 (06:53 -0400)]
Trim excessive arguments of follow_mount_rcu()

... and kill a useless local variable in follow_dotdot_rcu(), while
we are at it - follow_mount_rcu(nd, path, inode) *always* assigned
value to *inode, and always it had been path->dentry->d_inode (aka
nd->path.dentry->d_inode, since it always got &nd->path as the second
argument).

Signed-off-by: Al Viro <[email protected]>
13 years agosplit __follow_mount_rcu() into normal and .. cases
Al Viro [Fri, 27 May 2011 10:50:06 +0000 (06:50 -0400)]
split __follow_mount_rcu() into normal and .. cases

Signed-off-by: Al Viro <[email protected]>
13 years agoregulator: Fix _regulator_get_voltage if get_voltage callback is NULL
Axel Lin [Mon, 23 May 2011 12:08:10 +0000 (20:08 +0800)]
regulator: Fix _regulator_get_voltage if get_voltage callback is NULL

In the case of get_voltage callback is NULL, current implementation in
_regulator_get_voltage will return -EINVAL.

Also returns proper error if ret is negative value.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoUSB: TWL6025 allow different regulator name
Graeme Gregory [Sun, 22 May 2011 20:21:24 +0000 (21:21 +0100)]
USB: TWL6025 allow different regulator name

The twl6025 uses a different regulator for USB than the 6030 so select
the correct regulator name depending on the subclass of device.

Since V1

Use features passed via platform data instead of global variable.

Signed-off-by: Graeme Gregory <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoREGULATOR: TWL6025: add support to twl-regulator
Graeme Gregory [Sun, 22 May 2011 20:21:23 +0000 (21:21 +0100)]
REGULATOR: TWL6025: add support to twl-regulator

Adding support for the twl6025. Major difference in the twl6025 is the
group functionality has been removed from the chip so this affects how
regulators are enabled and disabled.

The names of the regulators also changed.

The DCDCs of the 6025 are software controllable as well.

Since V1

Use the features variable passed via platform data instead of calling
global function.

Change the very switch like if statements to be a more readable
switch statement.

Since V2

twl6025 doesn't use remap so remove it from the macros.

Since V3

enable/disable functions for 4030/6030 were seperated upstream so rebase
on top of this. Change DCDC reference to SMPS as this is used in TRM.
Change list_voltage slightly to have less code.

Signed-off-by: Graeme Gregory <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: twl6030: do not write to _GRP for regulator disable
Balaji T K [Fri, 20 May 2011 13:33:52 +0000 (19:03 +0530)]
regulator: twl6030: do not write to _GRP for regulator disable

TWL6030: regulator is disabled via VREG_STATE
TWL4030: regulator is disabled via VREG_GRP
Since there is nothing common, split twlreg_enable similar to other regulator_ops

Signed-off-by: Balaji T K <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: twl6030: do not write to _GRP for regulator enable
Balaji T K [Fri, 20 May 2011 13:33:51 +0000 (19:03 +0530)]
regulator: twl6030: do not write to _GRP for regulator enable

TWL6030: regulator is enabled via VREG_STATE
TWL4030: regulator is enabled via VREG_GRP
Since there is nothing common, split twlreg_enable similar to other regulator_ops

Signed-off-by: Balaji T K <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoTPS65911: Comparator: Add comparator driver
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:48 +0000 (18:35 -0500)]
TPS65911: Comparator: Add comparator driver

This driver adds functionality to the tps65911 chip driver.

Two of the comparators are configurable by software and measures
VCCS voltage to detect high or low voltage scenarios.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoTPS65911: Add support for added GPIO lines
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:42 +0000 (18:35 -0500)]
TPS65911: Add support for added GPIO lines

GPIO 1 to 8 are added for TPS65911 chip version. The gpio driver
now handles more than one gpio lines. Subsequent versions of the
chip family can add new GPIO lines with minimal driver changes.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Grant Likely <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoGPIO: TPS65910: Move driver to drivers/gpio/
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:37 +0000 (18:35 -0500)]
GPIO: TPS65910: Move driver to drivers/gpio/

The GPIO driver should reside in drivers/gpio/ for better
organization.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Grant Likely <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoTPS65911: Add new irq definitions
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:07 +0000 (18:35 -0500)]
TPS65911: Add new irq definitions

TPS65911 adds new interrupt sources, as well as two new registers
to handle them, one for interrupt status and one for interrupt
masking. The added irqs are:

-VMBCH2 - Low and High threshold
-GPIO1-8 - Rising and falling edge detection
-WTCHDG - Watchdog interrupt
-PWRDN - PWRDN reset interrupt

The code should handle these new registers only when the chip
version is TPS65911.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: tps65911: Add new chip version
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:35:03 +0000 (18:35 -0500)]
regulator: tps65911: Add new chip version

The tps65911 chip introduces new features, including changes in
the regulator module.

- VDD1 and VDD2 remain unchanged.
- VDD3 is now named VDDCTRL and has a wider voltage range.
- LDOs are now named LDO1...8 and voltage ranges are sequential,
  making LDOs easier to handle.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoMFD: TPS65910: Add support for TPS65911 device
Jorge Eduardo Candelaria [Mon, 16 May 2011 23:34:59 +0000 (18:34 -0500)]
MFD: TPS65910: Add support for TPS65911 device

The TPS65911 is the next generation of the TPS65910 family of
PMIC chips. It adds a few features:

- Watchdog Timer
- PWM & LED generators
- Comparators for system control status

It also adds a set of Interrupts and GPIOs, among other things.

The driver exports a function to identify between different
versions of the tps65910 family, allowing other modules to
identify the capabilities of the current chip.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Fix off-by-one value range checking for mc13xxx_regulator_get_voltage
Axel Lin [Wed, 18 May 2011 12:56:45 +0000 (20:56 +0800)]
regulator: Fix off-by-one value range checking for mc13xxx_regulator_get_voltage

We use val as array index,
thus the valid value rangae for val should be 0 .. n_voltages-1.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: mc13892: Fix voltage unit in test case.
Fabio Estevam [Mon, 16 May 2011 13:54:27 +0000 (10:54 -0300)]
regulator: mc13892: Fix voltage unit in test case.

Voltage values should be expressed in microvolts, not in milivolts.

Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Ranjani Vaidyanathan <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Remove MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS...
Axel Lin [Mon, 16 May 2011 10:20:34 +0000 (18:20 +0800)]
regulator: Remove MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS macros

In current implementation, the original macro implementation assumes the caller
pass the parameter starting from 1 (to match the register names in datasheet).
Thus we have unneeded plus one then minus one operations
when using MAX8997_REG_BUCK1DVS/MAX8997_REG_BUCK2DVS/MAX8997_REG_BUCK5DVS macros.

This patch removes these macros to avoid unneeded plus one then minus one operations
without reducing readability.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Kyungmin Park <[email protected]>
Acked-by: MyungJoo Ham <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agomfd: Fix off-by-one value range checking for tps65910_i2c_write
Axel Lin [Mon, 16 May 2011 14:19:01 +0000 (22:19 +0800)]
mfd: Fix off-by-one value range checking for tps65910_i2c_write

If bytes == (TPS65910_MAX_REGISTER + 1), we have a buffer overflow when
doing memcpy(&msg[1], src, bytes).

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Only apply voltage constraints from consumers that set them
Mark Brown [Sat, 14 May 2011 20:42:34 +0000 (13:42 -0700)]
regulator: Only apply voltage constraints from consumers that set them

When applying the set_voltage() requests from consumers skip over those
consumers that haven't set anything, otherwise we'll come out with a
maximum voltage of zero.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: If we can't configure optimum mode we're always in the best one
Mark Brown [Sat, 14 May 2011 18:19:45 +0000 (11:19 -0700)]
regulator: If we can't configure optimum mode we're always in the best one

If either a regulator driver can't tell us what the optimum mode is (or
doesn't have modes in the first place) or the system doesn't allow DRMS
changes then it's more helpful for users to just say that we're in the
optimal mode, even if it's from a selection of one.

Still report errors if the process of picking and setting a mode changes as
this may indicate that we're stuck in a low power mode and unable to deliver
a higher current that the consumer just asked for.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: max8997: remove useless code
Jonghwan Choi [Thu, 12 May 2011 02:37:48 +0000 (11:37 +0900)]
regulator: max8997: remove useless code

fix unreachable code.

Signed-off-by: Jonghwan Choi <[email protected]>
Signed-off-by: MyungJoo Ham <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Fix memory leak in max8998_pmic_probe failure path
Axel Lin [Fri, 13 May 2011 06:54:06 +0000 (14:54 +0800)]
regulator: Fix memory leak in max8998_pmic_probe failure path

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Kyungmin Park <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Fix desc_id for tps65023/6507x/65910
Axel Lin [Thu, 12 May 2011 05:47:50 +0000 (13:47 +0800)]
regulator: Fix desc_id for tps65023/6507x/65910

The desc_id variable should not be a static variable.

The rest of the code assumes the desc_id must less than TPSxxxxx_NUM_REGULATOR.
If we set desc_id to be a static variable, checking the return value of
rdev_get_id() may return error.

Signed-off-by: Axel Lin <[email protected]>
Cc: Anuj Aggarwal <[email protected]>
Cc: Graeme Gregory <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agolinux-next: build failure after merge of the voltage tree
Jorge Eduardo Candelaria [Wed, 11 May 2011 06:43:02 +0000 (01:43 -0500)]
linux-next: build failure after merge of the voltage tree

On May 10, 2011, at 9:27 PM, Stephen Rothwell wrote:

> Hi Jorge,
>
> On Tue, 10 May 2011 12:30:36 -0500 Jorge Eduardo Candelaria <[email protected]> wrote:
>>
>> On May 10, 2011, at 3:38 AM, Liam Girdwood wrote:
>>
>>> On Tue, 2011-05-10 at 12:44 +1000, Stephen Rothwell wrote:
>>>> Hi Liam,
>>>>
>>>> After merging the voltage tree, today's linux-next build (x86_64
>>>> allmodconfig) failed like this:
>>>>
>>>> ERROR: "tps65910_gpio_init" [drivers/mfd/tps65910.ko] undefined!
>>>> ERROR: "tps65910_irq_init" [drivers/mfd/tps65910.ko] undefined!
>>>> ERROR: "irq_modify_status" [drivers/mfd/tps65910-irq.ko] undefined!
>>>> ERROR: "irq_set_chip_and_handler_name" [drivers/mfd/tps65910-irq.ko] undefined!
>>>> ERROR: "handle_edge_irq" [drivers/mfd/tps65910-irq.ko] undefined!
>>>>
>>>> I have used the voltage tree from next-20110509 for today.
>>>
>>> Jorge, could you send a fix for this today.
>>
>> The following patch should solve this:
>>
>> From: Jorge Eduardo Candelaria <[email protected]>
>> MFD: Fix TPS65910 build
>>
>> Support for tps65910 as a module is not available. The driver can
>> only be compiled as built-in. OTOH, the regulator driver can still
>> be built as module without breaking the compilation.
>>
>> Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
>
> Today (even with the above patch included) I got these errors from the
> x86_64 allmodconfig build:
>
> tps65910.c:(.text+0xf4140): undefined reference to `i2c_master_send'
> drivers/built-in.o: In function `tps65910_i2c_read':
> tps65910.c:(.text+0xf41d2): undefined reference to `i2c_transfer'
> drivers/built-in.o: In function `tps65910_i2c_init':
> tps65910.c:(.init.text+0xcb83): undefined reference to `i2c_register_driver'
> drivers/built-in.o: In function `tps65910_i2c_exit':
> tps65910.c:(.exit.text+0x6e0): undefined reference to `i2c_del_driver'
>
> I have used the voltage tree from next-20110509 again today.

Following patch should fix the dependency problems. Please review:

From: Jorge Eduardo Candelaria <[email protected]>
[PATCH] MFD: TPS65910: Fix I2C dependency

TPS65910 driver can only be compiled built-in, so the I2C driver
should be as well.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoRevert "regulator: Move VCOINCELL to be the last element of mc13892_regulators array"
Axel Lin [Tue, 10 May 2011 11:10:36 +0000 (19:10 +0800)]
Revert "regulator: Move VCOINCELL to be the last element of mc13892_regulators array"

I check this patch again and found this actually is not a bug
because MC13xxx_DEFINE explictly defines the order of each entry in the array.

Thus revert the patch.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Remove some unused variables from wm831x DCDCs
Mark Brown [Tue, 10 May 2011 13:52:57 +0000 (15:52 +0200)]
regulator: Remove some unused variables from wm831x DCDCs

These became unused with the IRQ removal patch, I'm fairly sure that a
patch was sent earlier by someone else but it doesn't seem to have been
applied and I don't have a copy sitting around any more.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agolinux-next: build failure after merge of the voltage tree
Jorge Eduardo Candelaria [Tue, 10 May 2011 17:30:36 +0000 (12:30 -0500)]
linux-next: build failure after merge of the voltage tree

On May 10, 2011, at 3:38 AM, Liam Girdwood wrote:

> On Tue, 2011-05-10 at 12:44 +1000, Stephen Rothwell wrote:
>> Hi Liam,
>>
>> After merging the voltage tree, today's linux-next build (x86_64
>> allmodconfig) failed like this:
>>
>> ERROR: "tps65910_gpio_init" [drivers/mfd/tps65910.ko] undefined!
>> ERROR: "tps65910_irq_init" [drivers/mfd/tps65910.ko] undefined!
>> ERROR: "irq_modify_status" [drivers/mfd/tps65910-irq.ko] undefined!
>> ERROR: "irq_set_chip_and_handler_name" [drivers/mfd/tps65910-irq.ko] undefined!
>> ERROR: "handle_edge_irq" [drivers/mfd/tps65910-irq.ko] undefined!
>>
>> I have used the voltage tree from next-20110509 for today.
>
> Jorge, could you send a fix for this today.
>
> Thanks
>
> Liam
>

The following patch should solve this:

From: Jorge Eduardo Candelaria <[email protected]>
MFD: Fix TPS65910 build

Support for tps65910 as a module is not available. The driver can
only be compiled as built-in. OTOH, the regulator driver can still
be built as module without breaking the compilation.

Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoTPS65910: Add tps65910 regulator driver
Graeme Gregory [Mon, 2 May 2011 21:20:08 +0000 (16:20 -0500)]
TPS65910: Add tps65910 regulator driver

The regulator module consists of 3 DCDCs and 8 LDOs. The output
voltages are configurable and are meant to supply power to the
main processor and other components

Signed-off-by: Graeme Gregory <[email protected]>
Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoTPS65910: IRQ: Add interrupt controller
Graeme Gregory [Mon, 2 May 2011 21:20:04 +0000 (16:20 -0500)]
TPS65910: IRQ: Add interrupt controller

This module controls the interrupt handling for the tps chip. The
interrupt sources are the following:

- GPIO falling/rising edge detection
- Battery voltage below/above threshold
- PWRON signal
- PWRHOLD signal
- Temperature detection
- RTC alarm and periodic event

Signed-off-by: Graeme Gregory <[email protected]>
Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Reviewed-by: Mark Brown <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoTPS65910: GPIO: Add GPIO driver
Graeme Gregory [Mon, 2 May 2011 21:19:52 +0000 (16:19 -0500)]
TPS65910: GPIO: Add GPIO driver

TPS65910 has one configurable GPIO that can be used for several
purposes. Subsequent versions of the TPS chip support more than
one GPIO.

Signed-off-by: Graeme Gregory <[email protected]>
Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Grant Likely <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoMFD: TPS65910: Add new mfd device for TPS65910
Graeme Gregory [Mon, 2 May 2011 21:19:46 +0000 (16:19 -0500)]
MFD: TPS65910: Add new mfd device for TPS65910

The TPS65910 chip is a power management IC for multimedia and handheld
devices. It contains the following components:

- Regulators
- GPIO controller
- RTC

The tps65910 core driver is registered as a platform driver and provides
communication through I2C with the host device for the different
components.

Signed-off-by: Graeme Gregory <[email protected]>
Signed-off-by: Jorge Eduardo Candelaria <[email protected]>
Acked-by: Samuel Ortiz <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Use mc13xxx_reg_write instead of mc13xxx_reg_rmw in mc13892_sw_regulator_s...
Axel Lin [Mon, 9 May 2011 09:49:40 +0000 (17:49 +0800)]
regulator: Use mc13xxx_reg_write instead of mc13xxx_reg_rmw in mc13892_sw_regulator_set_voltage

Currently, we call mc13xxx_reg_read and mc13xxx_reg_rmw for the same register.
This can be converted to simply a mc13xxx_reg_read and a mc13xxx_reg_write,
thus save a redundant register read.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Support voltage offsets to compensate for drops in system
Mark Brown [Sun, 8 May 2011 21:13:37 +0000 (22:13 +0100)]
regulator: Support voltage offsets to compensate for drops in system

Some systems, particularly physically large systems used for early
prototyping, may experience substantial voltage drops between the regulator
and the consumers as a result of long traces in the system. With these
systems voltages may need to be set higher than requested in order to
ensure reliable system operation.

Allow systems to work around such hardware issues by allowing constraints
to supply an offset to be applied to any requested and reported voltages.
This is not ideal, especially since the voltage drop may be load dependant,
but is sufficient for most affected systems, it is not expected to be used
in production hardware. The offset is applied after all constraint
processing so constraints should be specified in terms of consumer values
not physically configured values.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Remove supply_regulator_dev from machine configuration
Mark Brown [Sun, 8 May 2011 21:30:18 +0000 (22:30 +0100)]
regulator: Remove supply_regulator_dev from machine configuration

supply_regulator_dev (using a struct pointer) has been deprecated in favour
of supply_regulator (using a regulator name) for quite a few releases
now with a warning generated if it is used and there are no current in tree
users so just remove the code.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Move VCOINCELL to be the last element of mc13892_regulators array
Axel Lin [Thu, 5 May 2011 15:32:58 +0000 (23:32 +0800)]
regulator: Move VCOINCELL to be the last element of mc13892_regulators array

In include/linux/mfd/mc13892.h, we define MC13892_VCOINCELL as 23.
Thus VCOINCELL should be defined as 23th element in mc13892_regulators array, not the first one.
This actually fixes an off-by-one bug while accessing mc13892_regulators array.

For example,
In mc13892_regulator_probe, we use MC13892_VCAM as array index of mc13892_regulators array.
        mc13892_regulators[MC13892_VCAM].desc.ops->set_mode
                = mc13892_vcam_set_mode;
Currently, it access mc13892_regulators[12] ,which is VAUDIO not VCAM.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Factor out references to rdev in regulator_force_disable()
Mark Brown [Mon, 9 May 2011 09:41:02 +0000 (11:41 +0200)]
regulator: Factor out references to rdev in regulator_force_disable()

Don't go looking up the rdev pointer every time, just use a local variable
like everything else.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Convert WM8400 to get_voltage_sel()
Mark Brown [Sun, 8 May 2011 21:19:09 +0000 (22:19 +0100)]
regulator: Convert WM8400 to get_voltage_sel()

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: Fix the argument of calling regulator_mode_constrain
Axel Lin [Fri, 1 Apr 2011 10:25:25 +0000 (18:25 +0800)]
regulator: Fix the argument of calling regulator_mode_constrain

The second parameter of regulator_mode_constrain takes a pointer.

This patch fixes below warning:
drivers/regulator/core.c: In function 'regulator_set_mode':
drivers/regulator/core.c:2014: warning: passing argument 2 of 'regulator_mode_constrain' makes pointer from integer without a cast
drivers/regulator/core.c:200: note: expected 'int *' but argument is of type 'unsigned int'

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <lrg@vega.(none)>
13 years agoregulator: twl: add twl6030 set_mode
Saquib Herman [Fri, 1 Apr 2011 04:52:46 +0000 (10:22 +0530)]
regulator: twl: add twl6030 set_mode

Current set_mode logic does not support 6030. The logic for 4030 is
not reusable for 6030 as the mode setting for 6030 now uses the new
CFG_STATE register. We hence rename the old get_status as being
specific to 4030.

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Saquib Herman <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <lrg@vega.(none)>
13 years agoregulator: twl: add twl6030 get_status
Saquib Herman [Fri, 1 Apr 2011 04:52:45 +0000 (10:22 +0530)]
regulator: twl: add twl6030 get_status

Current get_status logic does not support 6030 get_status.
The logic for 4030 is not reusable for 6030 as the status
check for 6030 now depends on the new CFG_STATE register.
We hence rename the old get_status as being specific to
4030 and remove the redundant check for the same.

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Saquib Herman <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <lrg@vega.(none)>
13 years agoregulator: twl: fix twl6030 regulator is_enabled
Saquib Herman [Fri, 1 Apr 2011 04:52:44 +0000 (10:22 +0530)]
regulator: twl: fix twl6030 regulator is_enabled

With TWL6030, it is not enough to ensure that the regulator is the
group of P1 group (CPU/Linux), but we need to check the state as far
as APP is concerned as well.

Split the current is_enabled to 6030 and 4030 specific ones. This
split impacts few macros and variables as well, but sets up the
stage for further fixes to set_mode and get_status in subsequent
patches.

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Saquib Herman <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <lrg@vega.(none)>
13 years agoregulator: twl: remap has no meaning for 6030
Saquib Herman [Fri, 1 Apr 2011 04:52:43 +0000 (10:22 +0530)]
regulator: twl: remap has no meaning for 6030

TWL6030 does not have remap register. The current implementation
causes value of remap to be written to state register, accidentally
causing the regulators which are probed to be switched on as well.
This is wrong as regulators should be controllable based on calls
to enable/disable for TWL regulator framework. Further, the values
initialized make no sense as well. We hence remove this from the
initalizers and also write to remap register only if the TWL
is 4030.

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Saquib Herman <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <lrg@vega.(none)>
13 years agoregulator: twl: fix twl6030 enable/disable
Saquib Herman [Fri, 1 Apr 2011 04:52:42 +0000 (10:22 +0530)]
regulator: twl: fix twl6030 enable/disable

TWL6030 requires an additional register write to CFG_STATE register
to explicitly state that the regulator is in a certain state. Merely
associating the regulator with the group is not enough. Add the
required register field definitions and fix the handling for
TWL6030 enable/disable.

Signed-off-by: Nishanth Menon <[email protected]>
Signed-off-by: Saquib Herman <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <lrg@vega.(none)>
13 years agoregulator: Add missing platform_set_drvdata in tps6105x_regulator_probe
Axel Lin [Tue, 29 Mar 2011 09:54:58 +0000 (17:54 +0800)]
regulator: Add missing platform_set_drvdata in tps6105x_regulator_probe

Otherwise, calling platform_get_drvdata in tps6105x_regulator_remove
returns NULL.

Signed-off-by: Axel Lin <[email protected]>
Acked-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agoregulator: When constraining modes fall back to higher power modes
Mark Brown [Tue, 29 Mar 2011 21:29:12 +0000 (06:29 +0900)]
regulator: When constraining modes fall back to higher power modes

If a mode requested by a consumer is not allowed by constraints
automatically fall back to a higher power mode if possible. This
ensures that consumers get at least the output they requested while
allowing machine drivers to transparently limit lower power modes
if required.

Signed-off-by: Mark Brown <[email protected]>
Signed-off-by: Liam Girdwood <[email protected]>
13 years agohwmon: (coretemp) Fix section mismatch
Jean Delvare [Thu, 26 May 2011 10:01:54 +0000 (06:01 -0400)]
hwmon: (coretemp) Fix section mismatch

chk_ucode_version() is only called from coretemp_probe() which is
__devinit, so it can be marked __devinit too.

Signed-off-by: Jean Delvare <[email protected]>
Cc: Durgadoss R <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Guenter Roeck <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
13 years agohwmon: (pmbus) Initialize sysfs attributes
Guenter Roeck [Tue, 24 May 2011 19:16:40 +0000 (12:16 -0700)]
hwmon: (pmbus) Initialize sysfs attributes

Initialize sysfs attrs before device_create_file() call to suppress
lockdep_init_map() warning:

WARNING: at kernel/lockdep.c:2701 lockdep_init_map+0x12d/0x140()

Reviewed-by: Robert Coulson <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
Cc: [email protected] # .39.x
13 years agohwmon: (coretemp) Update comments describing the handling of HT CPUs
Guenter Roeck [Mon, 23 May 2011 20:52:35 +0000 (13:52 -0700)]
hwmon: (coretemp) Update comments describing the handling of HT CPUs

Update comments describing the handling of HT CPUs based on review feedback.

Signed-off-by: Guenter Roeck <[email protected]>
Cc: Fenghua Yu <[email protected]>
Cc: Durgadoss R <[email protected]>
Acked-by: Jean Delvare <[email protected]>
13 years agohwmon: (coretemp) Initialize sysfs attributes
Sergey Senozhatsky [Tue, 24 May 2011 11:28:31 +0000 (07:28 -0400)]
hwmon: (coretemp) Initialize sysfs attributes

Initialize sysfs attrs before device_create_file() call to suppress lockdep_init_map()
warning:

[    3.653628] WARNING: at kernel/lockdep.c:2885 lockdep_init_map+0xea/0x43c()
[    3.653698] Modules linked in:
[    3.654835] Pid: 1, comm: swapper Not tainted 2.6.39-dbg-git8-05624-g46187f8 #576
[    3.656014] Call Trace:
[    3.657139]  [<ffffffff8103e4b4>] warn_slowpath_common+0x7e/0x96
[    3.658298]  [<ffffffff8103e4e1>] warn_slowpath_null+0x15/0x17
[    3.659460]  [<ffffffff8106d7b9>] lockdep_init_map+0xea/0x43c
[    3.660616]  [<ffffffff81163c1a>] sysfs_add_file_mode+0x5d/0xa8
[    3.661785]  [<ffffffff81163c71>] sysfs_add_file+0xc/0xe
[    3.662929]  [<ffffffff81163d26>] sysfs_create_file+0x23/0x25
[    3.664045]  [<ffffffff813724d1>] device_create_file+0x14/0x16
[    3.665172]  [<ffffffff81460ed4>] coretemp_probe+0xf9/0x185
[    3.666306]  [<ffffffff8137638e>] platform_drv_probe+0x12/0x14
[    3.667420]  [<ffffffff81375321>] driver_probe_device+0xb0/0x14b
[    3.668542]  [<ffffffff8137546d>] __device_attach+0x35/0x3a
[    3.669710]  [<ffffffff81375438>] ? __driver_attach+0x7c/0x7c
[    3.670816]  [<ffffffff8137426b>] bus_for_each_drv+0x54/0x88
[    3.671921]  [<ffffffff81375231>] device_attach+0x77/0x9b
[    3.673027]  [<ffffffff81374aef>] bus_probe_device+0x22/0x39
[    3.674137]  [<ffffffff81373235>] device_add+0x3c1/0x550
[    3.675249]  [<ffffffff81371ed9>] ? dev_set_name+0x3c/0x3e
[    3.676371]  [<ffffffff813769f3>] platform_device_add+0x10c/0x156
[    3.677491]  [<ffffffff8146af9c>] get_core_online+0xab/0x16e
[    3.678608]  [<ffffffff81ad8070>] coretemp_init+0x4b/0x80
[    3.679724]  [<ffffffff81ad8025>] ? hwmon_init+0xee/0xee
[    3.680853]  [<ffffffff8100020a>] do_one_initcall+0x7a/0x13c
[    3.681975]  [<ffffffff81aaac74>] kernel_init+0xe1/0x15b
[    3.683081]  [<ffffffff8147e4e4>] kernel_thread_helper+0x4/0x10
[    3.684174]  [<ffffffff8102d48c>] ? finish_task_switch+0x76/0xf0
[    3.685266]  [<ffffffff81477918>] ? retint_restore_args+0x13/0x13
[    3.686356]  [<ffffffff81aaab93>] ? start_kernel+0x3ee/0x3ee
[    3.687425]  [<ffffffff8147e4e0>] ? gs_change+0x13/0x13
[    3.688489] ---[ end trace 7392ad3e6a92ae39 ]---

Signed-off-by: Sergey Senozhatsky <[email protected]>
Signed-off-by: Guenter Roeck <[email protected]>
This page took 0.117565 seconds and 4 git commands to generate.