Align the placement as which the mfd_cell of LED is defined as the other
members done on the structure.
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Add compatible string as "mt6323-led" that will make
the OF core spawn child devices for the LED subnode
of that MT6323 MFD device.
Signed-off-by: Sean Wang <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Some sub driver like RTC module need irq domain from parent to create
irq mapping when driver initialize. so move mt6397_irq_init() before
mfd_add_devices().
Acked-by: John Crispin <[email protected]>
Signed-off-by: Henry Chen <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Use devm_mfd_add_devices() for MFD devices registration and get
rid of .remove callback to remove MFD child-devices. This is done
by managed device framework.
CC: John Crispin <[email protected]>
Signed-off-by: Laxman Dewangan <[email protected]>
Reviewed-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
The platform bus_type .match callback attempts to match the platform device
name with an entry on the .id_table if provided and fallbacks to match with
the driver's name if a table is not provided.
Using a platform device ID to match is more explicit, allows the driver to
support more than one device and also the MODULE_DEVICE_TABLE macro can be
used to export the module aliases information instead of the MODULE_ALIAS.
Signed-off-by: Javier Martinez Canillas <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
MT6323 has the INT_CON and INT_STATUS located at a different position.
Make the registers locations configurable.
Signed-off-by: John Crispin <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Implement .irq_set_wake() to get who is wakeup source and setup on suspend/reumse. Enable
mt6393_irq as wake up source properly to pinctrl by enable_irq_wake()/enable_irq_wake().
Signed-off-by: Henry Chen <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
already have a pointer to corresponding irq_desc.
Do the same change to avoid the pattern "irq_get_chip_data(data->irq)".
Signed-off-by: Jiang Liu <[email protected]>
Signed-off-by: Thomas Gleixner <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
set_irq_flags is ARM specific with custom flags which have genirq
equivalents. Convert drivers to use the genirq interfaces directly, so we
can kill off set_irq_flags. The translation of flags is as follows:
IRQF_VALID -> !IRQ_NOREQUEST
IRQF_PROBE -> !IRQ_NOPROBE
IRQF_NOAUTOEN -> IRQ_NOAUTOEN
For IRQs managed by an irqdomain, the irqdomain core code handles clearing
and setting IRQ_NOREQUEST already, so there is no need to do this in
.map() functions and we can simply remove the set_irq_flags calls. Some
users also modify IRQ_NOPROBE and this has been maintained although it
is not clear that is really needed. There appears to be a great deal of
blind copy and paste of this code.
Signed-off-by: Rob Herring <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
Provide MT6397 RTC interrupt, base address, and register in
MT6397 MFD.
Signed-off-by: Eddie Huang <[email protected]>
Acked-by: Lee Jones <[email protected]>
Signed-off-by: Alexandre Belloni <[email protected]>
Constify in various drivers configuration data which is not modified:
- regmap_irq_chip,
- individual regmap_irq's in array,
- regmap_config,
- irq_domain_ops,
Signed-off-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Lee Jones <[email protected]>
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]>