- 11 12月, 2012 3 次提交
-
-
由 Mark Brown 提交于
Avoid doing a linear scan of the entire register map for each read() of the debugfs register dump by recording the offsets where valid registers exist when we first read the registers file. This assumes the set of valid registers never changes, if this is not the case invalidation of the cache will be required. This could be further improved for large blocks of contiguous registers by calculating the register we will read from within the block - currently we do a linear scan of the block. An rbtree may also be worthwhile. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
In preparation for doing things a bit more quickly than a linear scan factor out the initial seek from the debugfs register dump. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
If count is less than the size of a register then we may hit integer wraparound when trying to move backwards to check if we're still in the buffer. Instead move the position forwards to check if it's still in the buffer, we are unlikely to be able to allocate a buffer sufficiently big to overflow here. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Cc: stable@vger.kernel.org
-
- 06 12月, 2012 1 次提交
-
-
由 Mark Brown 提交于
No point in calculating them every time. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 26 10月, 2012 1 次提交
-
-
由 Fabio Estevam 提交于
val_bytes is of 'size_t', so it should be printed as '%zu'. Fixes the following build warning on x86: drivers/base/regmap/regmap.c:872:4: warning: format '%d' expects argument of type 'int', but argument 5 has type 'size_t' [-Wformat] Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 15 10月, 2012 8 次提交
-
-
由 Mark Brown 提交于
If a block write covers a paged memory region and crosses a window boundary then rather than failing the write split the transfer up into multiple writes, making the whole process more transparent for drivers. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
The range code was written to check for return codes less than zero as errors but throughout the rest of the API return codes not equal to zero are errors. Change all these checks to match the house style. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
This will support a subsequent update to allow bulk writes to cross window boundaries. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
If a register range is named then provide a debugfs file showing the contents of the range separately. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
This will allow the use of the same code for reading register ranges. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
For more useful diagnostics. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
Rather than just returning a single error code for every possible thing we can notice print an error message saying what the problem was. This makes it very much easier to figure out what's wrong and fix it. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
This makes things consistent with the rest of the API and is actually what the documentation says. We don't currently have any in tree users so low cost. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 09 9月, 2012 1 次提交
-
-
由 Yunfan Zhang 提交于
The primary handler will NOT be called if the interrupt nests into another interrupt thread. Remove it to avoid confusing. Signed-off-by: NYunfan Zhang <yfzhang@marvell.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 31 8月, 2012 1 次提交
-
-
由 Xiaofan Tian 提交于
Currently, regmap will write 1 to mask_base to mask an interrupt and write 0 to unmask it. But some chips do not have an interrupt mask register, and only have interrupt enable register. Then we should write 0 to disable interrupt and 1 to enable. So add an mask_invert flag to handle this. If it is not set, behavior is same as previous. If set it to 1, the mask value will be inverted before written to mask_base Signed-off-by: NXiaofan Tian <tianxf@marvell.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 08 8月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Some devices need to have a runtime PM reference while handling interrupts to ensure that the register I/O is available. Support this with a flag in the chip. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 04 8月, 2012 7 次提交
-
-
由 Stephen Warren 提交于
The kerneldoc for irq_set_irq_wake() says: Enable/disable power management wakeup mode, which is disabled by default. regmap_irq_set_wake() clears bits to enable wake for an interrupt, and sets bits to disable wake. Hence, we should set all bits in wake_buf initially, to mirror the expected disabled state. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
If a regmap-irq chip has no wake base: * There's no point calling .irq_set_wake, hence IRQCHIP_SKIP_SET_WAKE. * If some IRQs in the chip are enabled for wake and some aren't, we should mask those interrupts that are not wake enabled, so that if they occur during suspend, the system is not awoken. Hence, IRQCHIP_MASK_ON_SUSPEND. Note that IRQCHIP_MASK_ON_SUSPEND is handled by check_wakeup_irqs(), which always iterates over every single interrupt in the system, irrespective of whether an interrupt is a child of a controller whose output interrupt has no wake-enabled inputs and hence is presumably masked itself. Hence this change might cause interrupt unnecessary masking operations and associated register I/O. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
This is intended to give each irq_chip a useful name, rather than hard- coding them all as "regmap". Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
This will allow later patches to adjust portions of the irq_chip individually for each regmap_irq_chip that is created. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
Don't write the full register, it's possible there's bits other than the masks in the same register which we shouldn't be changing. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Tested-by: NStephen Warren <swarren@wwwdotorg.org>
-
由 Stephen Warren 提交于
A number of places in the code were printing error messages that included the address of a register, but were not calculating the register address in the same way as the access to the register. Use a temporary to solve this. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Dimitris Papastamos 提交于
When bus->fast_io is set, the locking here is done with spinlocks. This is currently true for the regmap-mmio bus implementation. While holding a spinlock we can't go to sleep, various operations like removing the debugfs entries or re-initializing the cache will sleep, therefore, shift the locking up to the user. Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 19 7月, 2012 1 次提交
-
-
由 Dimitris Papastamos 提交于
Signed-off-by: NDimitris Papastamos <dp@opensource.wolfsonmicro.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 06 7月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Sometimes for failures during very early init the trace infrastructure isn't available early enough to be used. For this sort of problem defining LOG_DEVICE will add printks for basic register I/O on a specific device, allowing trace to be extracted when the trace system doesn't come up early enough to work with. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 19 6月, 2012 1 次提交
-
-
由 Krystian Garbaciak 提交于
After page update, orginal work_buf has to be restored regardless of the result. Signed-off-by: NKrystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 18 6月, 2012 2 次提交
-
-
由 Krystian Garbaciak 提交于
Devices with register paging or indirectly accessed registers can configure register mapping to map those on virtual address range. During access to virtually mapped register range, indirect addressing is processed automatically, in following steps: 1. selector for page or indirect register is updated (when needed); 2. register in data window is accessed. Configuration should provide minimum and maximum register for virtual range, details of selector field for page selection, minimum and maximum register of data window for indirect access. Virtual range registers are managed by cache as well as direct access registers. In order to make indirect access more efficient, selector register should be declared as non-volatile, if possible. struct regmap_config is extended with the following: struct regmap_range_cfg *ranges; unsigned int n_ranges; [Also reordered debugfs init to later on since the cleanup code was conflicting with the new cleanup code for ranges anyway -- broonie] Signed-off-by: NKrystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Krystian Garbaciak 提交于
Locks are moved to regmap_update_bits(), which allows to reenter internal function _regmap_update_bits() from inside of regmap read/write routines. Signed-off-by: NKrystian Garbaciak <krystian.garbaciak@diasemi.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 14 6月, 2012 1 次提交
-
-
由 Axel Lin 提交于
regmap_mmio_gen_context() is only used in regmap-mmio.c. Thus make it static. Signed-off-by: NAxel Lin <axel.lin@gmail.com> Acked-by: NStephen Warren <swarren@wwwdotorg.org> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 08 6月, 2012 1 次提交
-
-
由 Mark Brown 提交于
It's supposed to be there for drivers. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 05 6月, 2012 2 次提交
-
-
由 Mark Brown 提交于
Allow chips to provide a bank of registers for controlling the wake state in a similar fashion to the masks and propagate the wake count to the parent interrupt controller. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Mark Brown 提交于
If the driver supplied an empty entry in the array of IRQs then return an error rather than trying to do the mapping. This is intended for use with handling chip variants and similar situations. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 03 6月, 2012 5 次提交
-
-
由 Mark Brown 提交于
We should never be modifying it and it lets drivers declare it const. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Fabio Estevam 提交于
The word to be transmitted/received via regmap is composed by the following parts: config->reg_bits config->val_bits config->pad_bits ,so the total size should be calculated by summing up the number of bits of each element and using a DIV_ROUND_UP to return the number of bytes. Signed-off-by: NFabio Estevam <fabio.estevam@freescale.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
If debugfs isn't cleaned up, stale files will be left in the filesystem which will cause an OOPS when accessed the first time, and hang the accessing application when accessed again, presumably due to some lock being left held. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
This will avoid the regmap core converting all addresses and values into big endian, only for the mmio bus driver to have to convert them back to native endian. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
由 Stephen Warren 提交于
Add a field to struct regmap_bus that allows bus drivers to request that register addresses and values be formatted with a specific endianness. The default endianness is unchanged from current operation: Big. Implement native endian formatting/parsing for 16- and 32-bit values. This will be enough to support regmap-mmio.c. Signed-off-by: NStephen Warren <swarren@nvidia.com> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 30 5月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Since there are uses for I2C_M_NOSTART which are much more sensible and standard than most of the protocol mangling functionality (the main one being gather writes to devices where something like a register address needs to be inserted before a block of data) create a new I2C_FUNC_NOSTART for this feature and update all the users to use it. Also strengthen the disrecommendation of the protocol mangling while we're at it. In the case of regmap-i2c we remove the requirement for mangling as I2C_M_NOSTART is the only mangling feature which is being used. Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com> Acked-by: NWolfram Sang <w.sang@pengutronix.de> Signed-off-by: NJean Delvare <khali@linux-fr.org>
-
- 23 5月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Ensure that we can't get randconfig breakage by doing the IRQ_DOMAIN select automatically. Don't just do the select from REGMAP_IRQ to ensure that the select actually gets noticed. Reported-by: NRandy Dunlap <rdunlap@xenotime.net> Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-
- 18 5月, 2012 1 次提交
-
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@opensource.wolfsonmicro.com>
-