- 24 6月, 2022 3 次提交
-
-
由 Javier Martinez Canillas 提交于
There are some functions that were missed by commit d77e7456 ("regmap: Add bulk read/write callbacks into regmap_config") when support to define bulk read/write callbacks in regmap_config was introduced. The regmap_bulk_write() and regmap_noinc_write() functions weren't changed to use the added map->write instead of the map->bus->write handler. Also, the regmap_can_raw_write() was not modified to take map->write into account. So will only return true if a bus with a .write callback is set. Fixes: d77e7456 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20220616073435.1988219-4-javierm@redhat.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Javier Martinez Canillas 提交于
Before adding support to define bulk read/write callbacks in regmap_config by the commit d77e7456 ("regmap: Add bulk read/write callbacks into regmap_config"), the regmap_noinc_read() function returned an errno early a map->bus->read callback wasn't set. But that commit dropped the check and now a call to _regmap_raw_read() is attempted even when bulk read operations are not supported. That function checks for map->read anyways but there's no point to continue if the read can't succeed. Also is a fragile assumption to make so is better to make it fail earlier. Fixes: d77e7456 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20220616073435.1988219-3-javierm@redhat.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Javier Martinez Canillas 提交于
Support for drivers to define bulk read/write callbacks in regmap_config was introduced by the commit d77e7456 ("regmap: Add bulk read/write callbacks into regmap_config"), but this commit wrongly dropped a check in regmap_bulk_read() to determine whether bulk reads can be done or not. Before that commit, it was checked if map->bus was set. Now has to check if a map->read callback has been set. Fixes: d77e7456 ("regmap: Add bulk read/write callbacks into regmap_config") Signed-off-by: NJavier Martinez Canillas <javierm@redhat.com> Link: https://lore.kernel.org/r/20220616073435.1988219-2-javierm@redhat.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 09 5月, 2022 1 次提交
-
-
由 Marek Vasut 提交于
The map->bus can be NULL here, add the missing NULL pointer check. Fixes: d77e7456 ("regmap: Add bulk read/write callbacks into regmap_config") Reported-by: Nkernel test robot <lkp@intel.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Dan Carpenter <dan.carpenter@oracle.com> Cc: Mark Brown <broonie@kernel.org> To: linux-kernel@vger.kernel.org Link: https://lore.kernel.org/r/20220509003035.225272-1-marex@denx.deSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 05 5月, 2022 1 次提交
-
-
由 Marek Vasut 提交于
Currently the regmap_config structure only allows the user to implement single element register read/write using .reg_read/.reg_write callbacks. The regmap_bus already implements bulk counterparts of both, and is being misused as a workaround for the missing bulk read/write callbacks in regmap_config by a couple of drivers. To stop this misuse, add the bulk read/write callbacks to regmap_config and call them from the regmap core code. Signed-off-by: NMarek Vasut <marex@denx.de> Cc: Jagan Teki <jagan@amarulasolutions.com> Cc: Mark Brown <broonie@kernel.org> Cc: Maxime Ripard <maxime@cerno.tech> Cc: Robert Foss <robert.foss@linaro.org> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Thomas Zimmermann <tzimmermann@suse.de> To: dri-devel@lists.freedesktop.org Link: https://lore.kernel.org/r/20220430025145.640305-1-marex@denx.deSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 25 4月, 2022 1 次提交
-
-
由 Jeongtae Park 提交于
Current logic does not consider multi-stride cases, the max_register have to calculate with reg_stride because it is a kind of address range. Signed-off-by: NJeongtae Park <jtp.park@samsung.com> Link: https://lore.kernel.org/r/20220425114613.15934-1-jtp.park@samsung.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 04 4月, 2022 1 次提交
-
-
由 Rikard Falkeborn 提交于
The only usage of these is to pass their address to __regmap_init() or __devm_regmap_init(), both which takes pointers to const struct regmap_bus. Make them const to allow the compiler to put them in read-only memory. Signed-off-by: NRikard Falkeborn <rikard.falkeborn@gmail.com> Link: https://lore.kernel.org/r/20220330214110.36337-1-rikard.falkeborn@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 19 3月, 2022 2 次提交
-
-
由 Colin Foster 提交于
There's an inconsistency that arises when a register set can be accessed internally via MMIO, or externally via SPI. The VSC7514 chip allows both modes of operation. When internally accessed, the system utilizes __iomem, devm_ioremap_resource, and devm_regmap_init_mmio. For SPI it isn't possible to utilize memory-mapped IO. To properly operate, the resource base must be added to the register before every operation. Signed-off-by: NColin Foster <colin.foster@in-advantage.com> Link: https://lore.kernel.org/r/20220313224524.399947-3-colin.foster@in-advantage.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Colin Foster 提交于
Add an additional reg_downshift to be applied to register addresses before any register accesses. An example of a device that uses this is a VSC7514 chip, which require each register address to be downshifted by two if the access is performed over a SPI bus. Signed-off-by: NColin Foster <colin.foster@in-advantage.com> Link: https://lore.kernel.org/r/20220313224524.399947-2-colin.foster@in-advantage.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 17 2月, 2022 1 次提交
-
-
由 Prasad Kumpatla 提交于
With the existing logic where clear_ack is true (HW doesn’t support auto clear for ICR), interrupt clear register reset is not handled properly. Due to this only the first interrupts get processed properly and further interrupts are blocked due to not resetting interrupt clear register. Example for issue case where Invert_ack is false and clear_ack is true: Say Default ISR=0x00 & ICR=0x00 and ISR is triggered with 2 interrupts making ISR = 0x11. Step 1: Say ISR is set 0x11 (store status_buff = ISR). ISR needs to be cleared with the help of ICR once the Interrupt is processed. Step 2: Write ICR = 0x11 (status_buff), this will clear the ISR to 0x00. Step 3: Issue - In the existing code, ICR is written with ICR = ~(status_buff) i.e ICR = 0xEE -> This will block all the interrupts from raising except for interrupts 0 and 4. So expectation here is to reset ICR, which will unblock all the interrupts. if (chip->clear_ack) { if (chip->ack_invert && !ret) ........ else if (!ret) ret = regmap_write(map, reg, ~data->status_buf[i]); So writing 0 and 0xff (when ack_invert is true) should have no effect, other than clearing the ACKs just set. Fixes: 3a6f0fb7 ("regmap: irq: Add support to clear ack registers") Signed-off-by: NPrasad Kumpatla <quic_pkumpatl@quicinc.com> Reviewed-by: NCharles Keepax <ckeepax@opensource.cirrus.com> Tested-by: NMarek Szyprowski <m.szyprowski@samsung.com> Link: https://lore.kernel.org/r/20220217085007.30218-1-quic_pkumpatl@quicinc.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 14 2月, 2022 1 次提交
-
-
由 Tom Rix 提交于
Replace the second 'which' with 'the'. Change 'acknowleding' to 'acknowledging'. Signed-off-by: NTom Rix <trix@redhat.com> Link: https://lore.kernel.org/r/20220212143144.2648689-1-trix@redhat.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 24 1月, 2022 1 次提交
-
-
由 Luca Ceresoli 提交于
This is not a resource manager, it is a "Resource managed version of regmap_add_irq_chip()". Fix the comment. Signed-off-by: NLuca Ceresoli <luca@lucaceresoli.net> Link: https://lore.kernel.org/r/20220113144259.355845-1-luca@lucaceresoli.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 08 1月, 2022 2 次提交
-
-
由 Mark Brown 提交于
Signed-off-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20220107191145.813876-1-broonie@kernel.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Fabio Estevam 提交于
Since commit cffa4b21 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev"), the following debugfs error is seen on i.MX boards: debugfs: Directory 'dummy-iomuxc-gpr@20e0000' with parent 'regmap' already present! In the attempt to fix the memory leak, the above commit added a NULL check for map->debugfs_name. For the first debufs entry, map->debugfs_name is NULL and then the new name is allocated via kasprintf(). For the second debugfs entry, map->debugfs_name() is no longer NULL, so it will keep using the old entry name and the duplicate name error is seen. Quoting Mark Brown: "That means that if the device gets freed we'll end up with the old debugfs file hanging around pointing at nothing. ... To be more explicit this means we need a call to regmap_debugfs_exit() which will clean up all the existing debugfs stuff before we loose references to it." Call regmap_debugfs_exit() prior to regmap_debugfs_init() to fix the problem. Tested on i.MX6Q and i.MX6SX boards. Fixes: cffa4b21 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev") Suggested-by: NMark Brown <broonie@kernel.org> Signed-off-by: NFabio Estevam <festevam@denx.de> Link: https://lore.kernel.org/r/20220107163307.335404-1-festevam@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 15 11月, 2021 1 次提交
-
-
由 Ansuel Smith 提交于
Some device requires a special handling for reg_update_bits and can't use the normal regmap read write logic. An example is when locking is handled by the device and rmw operations requires to do atomic operations. Allow to declare a dedicated function in regmap_config for reg_update_bits in no bus configuration. Signed-off-by: NAnsuel Smith <ansuelsmth@gmail.com> Link: https://lore.kernel.org/r/20211104150040.1260-1-ansuelsmth@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 24 10月, 2021 2 次提交
-
-
由 Sean Anderson 提交于
This converts users of mdiobus to mdiodev using the following semantic patch: @@ identifier mdiodev; expression regnum; @@ - mdiobus_read(mdiodev->bus, mdiodev->addr, regnum) + mdiodev_read(mdiodev, regnum) @@ identifier mdiodev; expression regnum, val; @@ - mdiobus_write(mdiodev->bus, mdiodev->addr, regnum, val) + mdiodev_write(mdiodev, regnum, val) Signed-off-by: NSean Anderson <sean.anderson@seco.com> Reviewed-by: NFlorian Fainelli <f.fainelli@gmail.com> Signed-off-by: NDavid S. Miller <davem@davemloft.net>
-
由 Lucas Tanure 提交于
Set regmap raw read/write from spi max_transfer_size so regmap_raw_read/write can split the access into chunks Signed-off-by: NLucas Tanure <tanureal@opensource.cirrus.com> Reviewed-by: NCharles Keepax <ckeepax@opensource.cirrus.com> [André: fix build warning] Signed-off-by: NAndré Almeida <andrealmeid@collabora.com> Link: https://lore.kernel.org/r/20211021132721.13669-1-andrealmeid@collabora.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 12 10月, 2021 1 次提交
-
-
由 Yang Yingliang 提交于
In regcache_rbtree_insert_to_block(), when 'present' realloc failed, the 'blk' which is supposed to assign to 'rbnode->block' will be freed, so 'rbnode->block' points a freed memory, in the error handling path of regcache_rbtree_init(), 'rbnode->block' will be freed again in regcache_rbtree_exit(), KASAN will report double-free as follows: BUG: KASAN: double-free or invalid-free in kfree+0xce/0x390 Call Trace: slab_free_freelist_hook+0x10d/0x240 kfree+0xce/0x390 regcache_rbtree_exit+0x15d/0x1a0 regcache_rbtree_init+0x224/0x2c0 regcache_init+0x88d/0x1310 __regmap_init+0x3151/0x4a80 __devm_regmap_init+0x7d/0x100 madera_spi_probe+0x10f/0x333 [madera_spi] spi_probe+0x183/0x210 really_probe+0x285/0xc30 To fix this, moving up the assignment of rbnode->block to immediately after the reallocation has succeeded so that the data structure stays valid even if the second reallocation fails. Reported-by: NHulk Robot <hulkci@huawei.com> Fixes: 3f4ff561 ("regmap: rbtree: Make cache_present bitmap per node") Signed-off-by: NYang Yingliang <yangyingliang@huawei.com> Link: https://lore.kernel.org/r/20211012023735.1632786-1-yangyingliang@huawei.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 26 8月, 2021 1 次提交
-
-
由 Vladimir Oltean 提交于
Some drivers might access regmap in a context where a raw spinlock is held. An example is drivers/irqchip/irq-ls-extirq.c, which calls regmap_update_bits() from struct irq_chip :: irq_set_type, which is a method called by __irq_set_trigger() under the desc->lock raw spin lock. Since desc->lock is a raw spin lock and the regmap internal lock for mmio is a plain spinlock (which can become sleepable on RT), this is an invalid locking scheme and we get a splat stating that this is a "[ BUG: Invalid wait context ]". It seems reasonable for regmap to have an option use a raw spinlock too, so add that in the config such that drivers can request it. Suggested-by: NMark Brown <broonie@kernel.org> Signed-off-by: NVladimir Oltean <vladimir.oltean@nxp.com> Link: https://lore.kernel.org/r/20210825205041.927788-2-vladimir.oltean@nxp.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 02 8月, 2021 1 次提交
-
-
由 Icenowy Zheng 提交于
The reg_fields array fed to {devm_}regmap_field_bulk_alloc is currently not const, which is not correct on semantics (the functions shouldn't change reg_field contents) and prevents pre-defined const reg_field array to be used. As the implementation of this function doesn't change the content of it, just add const to its prototype. Signed-off-by: NIcenowy Zheng <icenowy@sipeed.com> Link: https://lore.kernel.org/r/20210802063741.76301-1-icenowy@sipeed.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 12 7月, 2021 2 次提交
-
-
由 Jinchao Wang 提交于
Fix checkpatch warnings: WARNING: Prefer 'unsigned int' to bare use of 'unsigned' Signed-off-by: NJinchao Wang <wjc@cdjrlc.com> Link: https://lore.kernel.org/r/20210628171907.63646-1-wjc@cdjrlc.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Jeongtae Park 提交于
This patch fixes the offset of register error log by using regmap_get_offset(). Signed-off-by: NJeongtae Park <jeongtae.park@gmail.com> Link: https://lore.kernel.org/r/20210701142630.44936-1-jeongtae.park@gmail.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 14 6月, 2021 2 次提交
-
-
由 Sander Vanheule 提交于
When an invalid register offset is provided, the upper bits are silently discarded. Change this to return -ENXIO instead, to help catch potential bugs. Signed-off-by: NSander Vanheule <sander@svanheule.net> Link: https://lore.kernel.org/r/047007e0e9fb596480829f11f8c7e6281d235c70.1623244066.git.sander@svanheule.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Sander Vanheule 提交于
A const qualifier was omitted in the declaration of the regmap_bus pointer, resulting in the following errors: drivers/base/regmap/regmap-mdio.c: In function ‘__regmap_init_mdio’: drivers/base/regmap/regmap-mdio.c:87:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 87 | bus = ®map_mdio_c22_bus; | ^ drivers/base/regmap/regmap-mdio.c:89:7: warning: assignment discards ‘const’ qualifier from pointer target type [-Wdiscarded-qualifiers] 89 | bus = ®map_mdio_c45_bus; | ^ Fix this by ensuring the pointer has the same qualifiers as the assigned values. Fixes: f083be9d ("regmap: mdio: Add clause-45 support") Signed-off-by: NSander Vanheule <sander@svanheule.net> Link: https://lore.kernel.org/r/f304ca638ffdc66d4803a6df1f75436894bd1d5f.1623244066.git.sander@svanheule.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 08 6月, 2021 2 次提交
-
-
由 Sander Vanheule 提交于
Modern ethernet phys support the so-called clause-45 register access mode, which allows for register address widths of 16 bit. Also allow for 16-bit register address widths, and return a regmap for clause-45 access in that case. Signed-off-by: NSander Vanheule <sander@svanheule.net> Link: https://lore.kernel.org/r/9cc263e3e7d5865edd90453b4183f1cf363cb636.1622743333.git.sander@svanheule.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Sander Vanheule 提交于
Currently a regmap configuration for regmap-mdio must have a register address width of 5 bits (cf. clause-22 register access). This is not enforced on the provided register addresses, which would enable clause-45 MDIO bus access, if the right bit packing is used. Prevent clause-45 access, and other invalid addresses, by masking the provided register address. Signed-off-by: NSander Vanheule <sander@svanheule.net> Link: https://lore.kernel.org/r/f7013f67e6d6ff56ec98660f18320f6ffcc1a777.1622743333.git.sander@svanheule.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 07 6月, 2021 1 次提交
-
-
由 Maxim Kochetkov 提交于
Some interrupt controllers have inverted status register: cleared bits is active interrupts and set bits is inactive interrupts, so add inverted status support to the framework. Signed-off-by: NMaxim Kochetkov <fido_max@inbox.ru> Link: https://lore.kernel.org/r/20210525034204.5272-1-fido_max@inbox.ruSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 26 5月, 2021 1 次提交
-
-
由 Antoniu Miclaus 提交于
This patch adds support for 7 bits register, 17 bits value type register formating. This is used, for example, by the Analog Devices ADMV1013/ADMV1014. Signed-off-by: NAntoniu Miclaus <antoniu.miclaus@analog.com> Signed-off-by: NAndrei Drimbarean <andrei.drimbarean@analog.com> Message-Id: <20210526085223.14896-1-antoniu.miclaus@analog.com> Signed-off-by: NMark Brown <broonie@kernel.org>
-
- 21 5月, 2021 1 次提交
-
-
由 Andy Shevchenko 提交于
regmap_mdio_read() breaks the principle of "no touch output till it's known that the operation succeeds". Refactor it accordingly. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Link: https://lore.kernel.org/r/20210520120518.30490-1-andriy.shevchenko@linux.intel.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 19 5月, 2021 1 次提交
-
-
由 Sander Vanheule 提交于
Basic support for MDIO bus access. Support only includes clause-22 register access, with 5-bit addresses, and 16-bit wide registers. Signed-off-by: NSander Vanheule <sander@svanheule.net> Link: https://lore.kernel.org/r/63b99a2fec2c4ea3c461d59d451af8d675ecf312.1621279162.git.sander@svanheule.netSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 14 5月, 2021 1 次提交
-
-
由 Lucas Tanure 提交于
Set regmap raw read/write from i2c quirks max read/write so regmap_raw_read/write can split the access into chunks Signed-off-by: NLucas Tanure <tanureal@opensource.cirrus.com> Link: https://lore.kernel.org/r/20210512135222.223203-1-tanureal@opensource.cirrus.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 07 4月, 2021 1 次提交
-
-
由 Colin Ian King 提交于
The clean up of struct d can potentiallly index into a null array d->virt_buf causing errorenous pointer dereferencing issues on kfree calls. Fix this by adding a null check on d->virt_buf before attempting to traverse the array to kfree the objects. Addresses-Coverity: ("Dereference after null check") Fixes: 4c501445 ("regmap-irq: Introduce virtual regs to handle more config regs") Signed-off-by: NColin Ian King <colin.king@canonical.com> Link: https://lore.kernel.org/r/20210406164002.430221-1-colin.king@canonical.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 31 3月, 2021 2 次提交
-
-
由 Guru Das Srinagesh 提交于
Enable drivers to configure and modify "virtual" registers, which are non-standard registers that further configure irq type on some devices. Since they are non-standard, enable drivers to configure them according to their particular idiosyncrasies by specifying an optional callback function while registering with the framework. Signed-off-by: NGuru Das Srinagesh <gurus@codeaurora.org> Link: https://lore.kernel.org/r/07e058cdec2297d15c95c825aa0263064d962d5a.1616613838.git.gurus@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
由 Guru Das Srinagesh 提交于
Add "virtual" registers support to handle any irq configuration registers in addition to the ones the framework currently supports (status, mask, unmask, wake, type and ack). These are non-standard registers that further configure irq type on some devices, so enable the framework to add a variable number of them. Signed-off-by: NGuru Das Srinagesh <gurus@codeaurora.org> Link: https://lore.kernel.org/r/a1787067004b0e11cb960319082764397469215a.1616613838.git.gurus@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 18 3月, 2021 1 次提交
-
-
由 Guru Das Srinagesh 提交于
Qualcomm's MFD chips have a top level interrupt status register and sub-irqs (peripherals). When a bit in the main status register goes high, it means that the peripheral corresponding to that bit has an unserviced interrupt. If the bit is not set, this means that the corresponding peripheral does not. Commit a2d21848 ("regmap: regmap-irq: Add main status register support") introduced the sub-irq logic that is currently applied only when reading status registers, but not for any other functions like acking or masking. Extend the use of sub-irq to all other functions, with two caveats regarding the specification of offsets: - Each member of the sub_reg_offsets array should be of length 1 - The specified offsets should be the unequal strides for each sub-irq device. In QCOM's case, all the *_base registers are to be configured to the base addresses of the first sub-irq group, with offsets of each subsequent group calculated as a difference from these addresses. Continuing from the example mentioned in the cover letter: /* * Address of MISC_INT_MASK = 0x1011 * Address of TEMP_ALARM_INT_MASK = 0x2011 * Address of GPIO01_INT_MASK = 0x3011 * * Calculate offsets as: * offset_0 = 0x1011 - 0x1011 = 0 (to access MISC's * registers) * offset_1 = 0x2011 - 0x1011 = 0x1000 * offset_2 = 0x3011 - 0x1011 = 0x2000 */ static unsigned int sub_unit0_offsets[] = {0}; static unsigned int sub_unit1_offsets[] = {0x1000}; static unsigned int sub_unit2_offsets[] = {0x2000}; static struct regmap_irq_sub_irq_map chip_sub_irq_offsets[] = { REGMAP_IRQ_MAIN_REG_OFFSET(sub_unit0_offsets), REGMAP_IRQ_MAIN_REG_OFFSET(sub_unit0_offsets), REGMAP_IRQ_MAIN_REG_OFFSET(sub_unit0_offsets), }; static struct regmap_irq_chip chip_irq_chip = { --------8<-------- .not_fixed_stride = true, .mask_base = MISC_INT_MASK, .type_base = MISC_INT_TYPE, .ack_base = MISC_INT_ACK, .sub_reg_offsets = chip_sub_irq_offsets, --------8<-------- }; Signed-off-by: NGuru Das Srinagesh <gurus@codeaurora.org> Link: https://lore.kernel.org/r/526562423eaa58b4075362083f561841f1d6956c.1615423027.git.gurus@codeaurora.orgSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 10 3月, 2021 1 次提交
-
-
由 Meng Li 提交于
There is a upstream commit cffa4b21("regmap:debugfs: Fix a memory leak when calling regmap_attach_dev") that adds a if condition when create name for debugfs_name. With below function invoking logical, debugfs_name is freed in regmap_debugfs_exit(), but it is not created again because of the if condition introduced by above commit. regmap_reinit_cache() regmap_debugfs_exit() ... regmap_debugfs_init() So, set debugfs_name to NULL after it is freed. Fixes: cffa4b21 ("regmap: debugfs: Fix a memory leak when calling regmap_attach_dev") Signed-off-by: NMeng Li <Meng.Li@windriver.com> Link: https://lore.kernel.org/r/20210226021737.7690-1-Meng.Li@windriver.comSigned-off-by: NMark Brown <broonie@kernel.org>
-
- 11 2月, 2021 3 次提交
-
-
由 Bard Liao 提交于
"GPL v2" is the same as "GPL". It exists for historic reasons. See Documentation/process/license-rules.rst Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Signed-off-by: NBard Liao <yung-chuan.liao@linux.intel.com> Acked-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210122070634.12825-8-yung-chuan.liao@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Bard Liao 提交于
Use no_pm versions for write and read. Signed-off-by: NBard Liao <yung-chuan.liao@linux.intel.com> Signed-off-by: NPierre-Louis Bossart <pierre-louis.bossart@linux.intel.com> Reviewed-by: NRander Wang <rander.wang@linux.intel.com> Acked-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210122070634.12825-7-yung-chuan.liao@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
由 Bard Liao 提交于
sdw_update_slave_status will be invoked when a codec is attached, and the codec driver will initialize the codec with regmap functions while the codec device is pm_runtime suspended. regmap routines currently rely on regular SoundWire IO functions, which will call pm_runtime_get_sync()/put_autosuspend. This causes a deadlock where the resume routine waits for an initialization complete signal that while the initialization complete can only be reached when the resume completes. The only solution if we allow regmap functions to be used in resume operations as well as during codec initialization is to use _no_pm routines. The duty of making sure the bus is operational needs to be handled above the regmap level. Fixes: 7c22ce6e ('regmap: Add SoundWire bus support') Signed-off-by: NBard Liao <yung-chuan.liao@linux.intel.com> Acked-by: NMark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20210122070634.12825-6-yung-chuan.liao@linux.intel.comSigned-off-by: NVinod Koul <vkoul@kernel.org>
-
- 21 1月, 2021 1 次提交
-
-
由 Jiapeng Zhong 提交于
Fix the following coccicheck warnings: ./drivers/base/regmap/regcache.c:71:3-18: WARNING: Assignment of 0/1 to bool variable. Reported-by: NAbaci Robot <abaci@linux.alibaba.com> Signed-off-by: NJiapeng Zhong <abaci-bugfix@linux.alibaba.com> Link: https://lore.kernel.org/r/1611215961-33725-1-git-send-email-abaci-bugfix@linux.alibaba.comSigned-off-by: NMark Brown <broonie@kernel.org>
-