aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2015-03-12mfd: intel_quark_i2c_gpio: Add Intel Quark X1000 I2C-GPIO MFD DriverRaymond Tan3-0/+290
In Quark X1000, there's a single PCI device that provides both an I2C controller and a GPIO controller. This MFD driver will split the 2 devices for their respective drivers. This patch is based on Josef Ahmad's initial work for Quark enabling. Acked-by: Michael Turquette <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Weike Chen <[email protected]> Signed-off-by: Raymond Tan <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-12mfd: rk808: Disable the under voltage detectChris Zhong2-0/+4
Rk808 has a under voltage detect function, when the voltage of buck is under 85% the target voltage, the buck output will reset. But if the power load is too heavy, this function maybe err, when current over 4.2A, although the voltage is normal, but RK808 mistakenly think it is under 85%, and reset the buck. So let's disable this function. Signed-off-by: Chris Zhong <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-12mfd: ab8500-debugfs: Remove use of seq_printf return valueJoe Perches1-75/+121
The seq_printf return value, because it's frequently misused, will eventually be converted to void. See: commit 1f33c41c03da ("seq_file: Rename seq_overflow() to seq_has_overflowed() and make public") Signed-off-by: Joe Perches <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-12mfd: rt5033: MFD_RT5033 needs to select REGMAP_IRQArtem Savkov1-0/+1
Since commit 0b2712585(linux-next.git) this driver uses regmap_irq and so needs to select REGMAP_IRQ. This fixes the following compilation errors: ERROR: "regmap_irq_get_domain" [drivers/mfd/rt5033.ko] undefined! ERROR: "regmap_add_irq_chip" [drivers/mfd/rt5033.ko] undefined! Signed-off-by: Artem Savkov <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-12mfd: da9052: Register ability of device to cause a wake-up interruptAdam Ward1-0/+2
Signed-off-by: Adam Ward <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-12mfd: da9052: Fix register access via SPIAdam Ward1-1/+5
The range of registers used by this driver exceeds that available via SPI with no paging (127), so we have to override the values from the default config which is set-up for I2C access. Also change SPI settings to match device's recommended OTP values. Signed-off-by: Adam Ward <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-04mfd: max77843: Add max77843 MFD driver core driverJaewon Kim4-0/+712
This patch adds MAX77843 core/irq driver to support PMIC, MUIC(Micro USB Interface Controller), Charger, Fuel Gauge, LED and Haptic device. Signed-off-by: Jaewon Kim <[email protected]> Signed-off-by: Beomho Seo <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-04mfd: dt-bindings: Add bindings for the MediaTek MT6397 PMICSascha Hauer1-0/+70
Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-04mfd: Add support for the MediaTek MT6397 PMICFlora Fu5-0/+664
This adds support for the MediaTek MT6397 PMIC. This is a multifunction device with the following sub modules: - Regulator - RTC - Audio codec - GPIO - Clock It is interfaced to the host controller using SPI interface by a proprietary hardware called PMIC wrapper or pwrap. MT6397 MFD is a child device of the pwrap. Signed-off-by: Flora Fu, MediaTek Signed-off-by: Sascha Hauer <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: sec: Remove unnecessary out of memory messageKrzysztof Kozlowski1-3/+1
There is no need to print additional ENOMEM message for sec_platform_data allocation failure. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: sec: Cleanup unused RTC fields: ono, WTSR and SMPLKrzysztof Kozlowski2-10/+0
The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary Power Loss) were removed from rtc-s5m driver because they were not used. Remove them (and on/off interrupt) from main MFD driver and header. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: da9150: Add DT binding documentation for coreAdam Thomson1-0/+43
Signed-off-by: Adam Thomson <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: arizona: Move useful defines into a dt-binding includeCharles Keepax4-66/+44
Move parts of linux/mfd/arizona/pdata.h and gpio.h into a new file in the dt-binding directory for use by device tree bindings. This also makes gpio.h redundant so remove it in the process. Signed-off-by: Charles Keepax <[email protected]> Acked-by: Mark Brown <[email protected]> Acked-by: Rob Herring <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: da9150: Constify struct regmap_configKrzysztof Kozlowski1-1/+1
The regmap_config struct may be const because it is not modified by the driver and regmap_init() accepts pointer to const. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03rtc: s5m: Remove unused watchdog and sudden momentary power lossKrzysztof Kozlowski1-60/+0
The WTSR (Watchdog Timer Software Reset) and SMPL (Sudden Momentary Power Loss) are never enabled. These are left-overs from board files. After removing them the driver's shutdown callback is empty so get rid of it as well. Signed-off-by: Krzysztof Kozlowski <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Using pcr_dbg replace dev_dbgMicky Ching6-41/+35
pcr_dbg is a wrapper of dev_dbg, which can save some code, and help to enable/disable debug message static. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Add support for rts525AMicky Ching4-3/+129
Add support for new chip rts525A. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Add support for rts524AMicky Ching4-32/+318
add support for new chip rts524A. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Remove LCTLR definationMicky Ching6-55/+21
To enable/disable ASPM we should find LINK CONTROL register in PCI config space. All old chip use 0x80 address, but new chip may use another address, so we using pci_find_capability() to get LINK CONTROL address. rtsx_gops.c was removed, we consider to put some common operations to this file, but the actual thing is, only a group of chips are in common ops1, and another group of chips in common ops2, it is hard to decide put which ops into generic ops file. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Update phy registerMicky Ching2-66/+72
Update some phy register name and value for rts5249, the updated value makes chip more stable on some platform. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Update driving settingsMicky Ching1-6/+6
update card drive settings, This setting can be used for rts5249 rts524A and rts525A. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Update PETXCFG addressMicky Ching3-9/+5
PETXCFG is defined at 0xFF03, the old 0xFE49 not used any more. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Place register address and values togatherMicky Ching1-467/+369
It is more readable to place register address and values define togather. The values define add two leading space indicate belong to the register address defined above. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: rtsx: Replace TAB by SPC after #defineMicky Ching1-127/+127
Re-format coding-style, using uniform SPC after "#define" keyword instead of mixing using TAB and SPC. Signed-off-by: Micky Ching <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: ti_am335x_tscadc: Remove unwanted reg_se_cache saveVignesh R2-8/+6
In one shot mode, sequencer automatically disables all enabled steps at the end of each cycle. (both ADC steps and TSC steps) Hence these steps need not be saved in reg_se_cache for clearing these steps at a later stage. Also, when ADC wakes up Sequencer should not be busy executing any of the config steps except for the charge step. Previously charge step was 1 ADC clock cycle and hence it was ignored. TSC steps are always disabled at the end of each conversion cycle, hence there is no need to explicitly disable TSC steps by writing 0 to REG_SE. Signed-off-by: Vignesh R <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: vexpress: Remove non-DT codePawel Moll1-56/+15
Now, as all VE platforms have to be booted with DT, the code handling non-DT case can be removed. Signed-off-by: Pawel Moll <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: Add support for COMe-cBL6 to Kontron PLD driverMichael Brunner2-2/+10
This patch adds the DMI system ID of the Kontron COMe-cBL6 board to the Kontron PLD driver. The list of supported products in the module description is also updated. Signed-off-by: Michael Brunner <[email protected]> Acked-by: Christian Rauch <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: axp20x: Change battery cell name to fuel gaugeTodd Brandt1-4/+4
Name changes to the battery cell structure to a more generic cell type: fuel gauge. Signed-off-by: Todd Brandt <[email protected]> Acked-By: Sebastian Reichel <[email protected]> Acked-by: Jacob Pan <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: intel_soc_pmic: Ensure GPIO irq is set to input pinJarkko Nikula1-1/+1
Surely GPIO irq will be used as an input pin so make sure its direction is set after requesting. Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: intel_soc_pmic: Do not mangle error code from devm_gpiod_get_index()Jarkko Nikula1-1/+1
It is usually better to pass actual error code from a function call than mangling it to another. Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-03-03mfd: intel_soc_pmic: Move PMIC interrupt comment to probe functionJarkko Nikula1-5/+5
intel_soc_pmic_find_gpio_irq() tries to find a GPIO interrupt but doesn't select between it or I2C interrupt so it makes more sense to move this comment to intel_soc_pmic_i2c_probe() with minor edits. Signed-off-by: Jarkko Nikula <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-02-26ASoC: arizona: Add support for WM8280/WM8281Richard Fitzgerald1-0/+2
Signed-off-by: Richard Fitzgerald <[email protected]> Acked-by: Mark Brown <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-02-26extcon: arizona: Add support for WM8280/WM8281Richard Fitzgerald1-0/+1
Signed-off-by: Richard Fitzgerald <[email protected]> Acked-by: Chanwoo Choi <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-02-26gpio: arizona: Add support for WM8280/WM8281Richard Fitzgerald1-0/+1
Signed-off-by: Richard Fitzgerald <[email protected]> Acked-by: Linus Walleij <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-02-26regulator: arizona-micsupp: Add support for WM8280/WM8281Richard Fitzgerald1-0/+1
Signed-off-by: Richard Fitzgerald <[email protected]> Reviewed-by: Mark Brown <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-02-26Documentation: devicetree: arizona: Add bindings for WM8280Richard Fitzgerald1-4/+11
Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Charles Keepax <[email protected]> Signed-off-by: Lee Jones <[email protected]>
2015-02-26mfd: arizona: Add support for WM8280/WM8281Richard Fitzgerald6-4/+22
This adds support for the Wolfson Microelectronics WM8280 and WM8281 codecs. Signed-off-by: Richard Fitzgerald <[email protected]> Signed-off-by: Charles Keepax <[email protected]> [Lee: Minor fixup to remove potentially uninitialised variable. ] Signed-off-by: Lee Jones <[email protected]>
2015-02-22Linux 4.0-rc1Linus Torvalds1-4/+4
.. after extensive statistical analysis of my G+ polling, I've come to the inescapable conclusion that internet polls are bad. Big surprise. But "Hurr durr I'ma sheep" trounced "I like online polls" by a 62-to-38% margin, in a poll that people weren't even supposed to participate in. Who can argue with solid numbers like that? 5,796 votes from people who can't even follow the most basic directions? In contrast, "v4.0" beat out "v3.20" by a slimmer margin of 56-to-44%, but with a total of 29,110 votes right now. Now, arguably, that vote spread is only about 3,200 votes, which is less than the almost six thousand votes that the "please ignore" poll got, so it could be considered noise. But hey, I asked, so I'll honor the votes.
2015-02-22Merge tag 'ext4_for_linus' of ↵Linus Torvalds5-56/+108
git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4 Pull ext4 fixes from Ted Ts'o: "Ext4 bug fixes. We also reserved code points for encryption and read-only images (for which the implementation is mostly just the reserved code point for a read-only feature :-)" * tag 'ext4_for_linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tytso/ext4: ext4: fix indirect punch hole corruption ext4: ignore journal checksum on remount; don't fail ext4: remove duplicate remount check for JOURNAL_CHECKSUM change ext4: fix mmap data corruption in nodelalloc mode when blocksize < pagesize ext4: support read-only images ext4: change to use setup_timer() instead of init_timer() ext4: reserve codepoints used by the ext4 encryption feature jbd2: complain about descriptor block checksum errors
2015-02-22Merge branch 'for-linus-2' of ↵Linus Torvalds70-758/+907
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull more vfs updates from Al Viro: "Assorted stuff from this cycle. The big ones here are multilayer overlayfs from Miklos and beginning of sorting ->d_inode accesses out from David" * 'for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (51 commits) autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocation procfs: fix race between symlink removals and traversals debugfs: leave freeing a symlink body until inode eviction Documentation/filesystems/Locking: ->get_sb() is long gone trylock_super(): replacement for grab_super_passive() fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversions VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry) SELinux: Use d_is_positive() rather than testing dentry->d_inode Smack: Use d_is_positive() rather than testing dentry->d_inode TOMOYO: Use d_is_dir() rather than d_inode and S_ISDIR() Apparmor: Use d_is_positive/negative() rather than testing dentry->d_inode Apparmor: mediated_filesystem() should use dentry->d_sb not inode->i_sb VFS: Split DCACHE_FILE_TYPE into regular and special types VFS: Add a fallthrough flag for marking virtual dentries VFS: Add a whiteout dentry type VFS: Introduce inode-getting helpers for layered/unioned fs environments Infiniband: Fix potential NULL d_inode dereference posix_acl: fix reference leaks in posix_acl_create autofs4: Wrong format for printing dentry ...
2015-02-22Merge branch 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-armLinus Torvalds1-1/+1
Pull ARM fix from Russell King: "Just one fix this time around. __iommu_alloc_buffer() can cause a BUG() if dma_alloc_coherent() is called with either __GFP_DMA32 or __GFP_HIGHMEM set. The patch from Alexandre addresses this" * 'fixes' of git://ftp.arm.linux.org.uk/~rmk/linux-arm: ARM: 8305/1: DMA: Fix kzalloc flags in __iommu_alloc_buffer()
2015-02-22autofs4 copy_dev_ioctl(): keep the value of ->size we'd used for allocationAl Viro1-2/+6
X-Coverup: just ask spender Cc: [email protected] Signed-off-by: Al Viro <[email protected]>
2015-02-22procfs: fix race between symlink removals and traversalsAl Viro3-12/+22
use_pde()/unuse_pde() in ->follow_link()/->put_link() resp. Cc: [email protected] Signed-off-by: Al Viro <[email protected]>
2015-02-22debugfs: leave freeing a symlink body until inode evictionAl Viro1-17/+17
As it is, we have debugfs_remove() racing with symlink traversals. Supply ->evict_inode() and do freeing there - inode will remain pinned until we are done with the symlink body. And rip the idiocy with checking if dentry is positive right after we'd verified debugfs_positive(), which is a stronger check... Cc: [email protected] Signed-off-by: Al Viro <[email protected]>
2015-02-22Documentation/filesystems/Locking: ->get_sb() is long goneAl Viro1-2/+0
Signed-off-by: Al Viro <[email protected]>
2015-02-22trylock_super(): replacement for grab_super_passive()Konstantin Khlebnikov3-26/+22
I've noticed significant locking contention in memory reclaimer around sb_lock inside grab_super_passive(). Grab_super_passive() is called from two places: in icache/dcache shrinkers (function super_cache_scan) and from writeback (function __writeback_inodes_wb). Both are required for progress in memory allocator. Grab_super_passive() acquires sb_lock to increment sb->s_count and check sb->s_instances. It seems sb->s_umount locked for read is enough here: super-block deactivation always runs under sb->s_umount locked for write. Protecting super-block itself isn't a problem: in super_cache_scan() sb is protected by shrinker_rwsem: it cannot be freed if its slab shrinkers are still active. Inside writeback super-block comes from inode from bdi writeback list under wb->list_lock. This patch removes locking sb_lock and checks s_instances under s_umount: generic_shutdown_super() unlinks it under sb->s_umount locked for write. New variant is called trylock_super() and since it only locks semaphore, callers must call up_read(&sb->s_umount) instead of drop_super(sb) when they're done. Signed-off-by: Konstantin Khlebnikov <[email protected]> Signed-off-by: Al Viro <[email protected]>
2015-02-22fanotify: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversionsDavid Howells1-1/+1
Fanotify probably doesn't want to watch autodirs so make it use d_can_lookup() rather than d_is_dir() when checking a dir watch and give an error on fake directories. Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
2015-02-22Cachefiles: Fix up scripted S_ISDIR/S_ISREG/S_ISLNK conversionsDavid Howells4-9/+9
Fix up the following scripted S_ISDIR/S_ISREG/S_ISLNK conversions (or lack thereof) in cachefiles: (1) Cachefiles mostly wants to use d_can_lookup() rather than d_is_dir() as it doesn't want to deal with automounts in its cache. (2) Coccinelle didn't find S_IS* expressions in ASSERT() statements in cachefiles. Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
2015-02-22VFS: (Scripted) Convert S_ISLNK/DIR/REG(dentry->d_inode) to d_is_*(dentry)David Howells34-71/+71
Convert the following where appropriate: (1) S_ISLNK(dentry->d_inode) to d_is_symlink(dentry). (2) S_ISREG(dentry->d_inode) to d_is_reg(dentry). (3) S_ISDIR(dentry->d_inode) to d_is_dir(dentry). This is actually more complicated than it appears as some calls should be converted to d_can_lookup() instead. The difference is whether the directory in question is a real dir with a ->lookup op or whether it's a fake dir with a ->d_automount op. In some circumstances, we can subsume checks for dentry->d_inode not being NULL into this, provided we the code isn't in a filesystem that expects d_inode to be NULL if the dirent really *is* negative (ie. if we're going to use d_inode() rather than d_backing_inode() to get the inode pointer). Note that the dentry type field may be set to something other than DCACHE_MISS_TYPE when d_inode is NULL in the case of unionmount, where the VFS manages the fall-through from a negative dentry to a lower layer. In such a case, the dentry type of the negative union dentry is set to the same as the type of the lower dentry. However, if you know d_inode is not NULL at the call site, then you can use the d_is_xxx() functions even in a filesystem. There is one further complication: a 0,0 chardev dentry may be labelled DCACHE_WHITEOUT_TYPE rather than DCACHE_SPECIAL_TYPE. Strictly, this was intended for special directory entry types that don't have attached inodes. The following perl+coccinelle script was used: use strict; my @callers; open($fd, 'git grep -l \'S_IS[A-Z].*->d_inode\' |') || die "Can't grep for S_ISDIR and co. callers"; @callers = <$fd>; close($fd); unless (@callers) { print "No matches\n"; exit(0); } my @cocci = ( '@@', 'expression E;', '@@', '', '- S_ISLNK(E->d_inode->i_mode)', '+ d_is_symlink(E)', '', '@@', 'expression E;', '@@', '', '- S_ISDIR(E->d_inode->i_mode)', '+ d_is_dir(E)', '', '@@', 'expression E;', '@@', '', '- S_ISREG(E->d_inode->i_mode)', '+ d_is_reg(E)' ); my $coccifile = "tmp.sp.cocci"; open($fd, ">$coccifile") || die $coccifile; print($fd "$_\n") || die $coccifile foreach (@cocci); close($fd); foreach my $file (@callers) { chomp $file; print "Processing ", $file, "\n"; system("spatch", "--sp-file", $coccifile, $file, "--in-place", "--no-show-diff") == 0 || die "spatch failed"; } [AV: overlayfs parts skipped] Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>
2015-02-22SELinux: Use d_is_positive() rather than testing dentry->d_inodeDavid Howells1-2/+2
Use d_is_positive() rather than testing dentry->d_inode in SELinux to get rid of direct references to d_inode outside of the VFS. Signed-off-by: David Howells <[email protected]> Signed-off-by: Al Viro <[email protected]>