-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'mfd-next-4.20' of git://git.kernel.org/pub/scm/linux/kerne…
…l/git/lee/mfd Pull MFD updates from Lee Jones: "New Drivers - Add support for USART SPI to AT91* New Functionality - Add support for Audio CODECs to motorola-cpcap Fix-ups - DT documentation fix-ups; atmel-usart - Staticise functions/structs; spi-at91-usart, arizona-core - Constify; ti-lmu - Fix memory leaks; menelaus - Change device 'wake-up' status; ti_am335x_tscadc, max8997 - Power Management (suspend/resume) semantic changes; ti_am335x_adc, cros_ec, max8997 - SPDX churn; sec-core (+ headers), max* (+ headers), intel* (+ headers), - Trivial (whitespace, email addresses, alphabetisise); Kconfig, adp5520, intel_soc_pmic_* - Build as module; sec-irq - Use new %pOFn printk format for device_node.name; max77620 - Remove unused code; madera - Use generic MACROs; intel_msic, intel_soc_pmic_crc - Move to GPIOD; ti-lmu - Use managed resources; ti-lmu Bug Fixes - Add missing headers; at91-usart - Prevent device from entering low-power mode; arizona-core - Poll for BOOT_DONE to avoid still-booting NACK; madera-core - Prevent ADC read from shutting down device; mc13xxx-core" * tag 'mfd-next-4.20' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: (45 commits) mfd: cros_ec: Avoid unneeded internal declaration warning mfd: ti-lmu: Use of_device_get_match_data() helper mfd: ti-lmu: Use managed resource for everything mfd: ti-lmu: Switch to GPIOD mfd: ti-lmu: constify mfd_cell tables mfd: max8997: Disable interrupt handling for suspend/resume cycle mfd: max8997: Enale irq-wakeup unconditionally mfd: arizona: Make array mclk_name static, shrinks object size MAINTAINERS: Add myself as designated reviewer of Intel MFD PMIC mfd: Convert Intel PMIC drivers to use SPDX identifier 1;5201;0c Reduce size of duplicated comments by switching to use SPDX identifier. mfd: Sort headers alphabetically for Intel PMIC drivers mfd: intel_soc_pmic_bxtwc: Chain power button IRQs as well mfd: intel_soc_pmic_crc: Use REGMAP_IRQ_REG() macro mfd: intel_soc_pmic_crc: Use DEFINE_RES_IRQ_NAMED() macro mfd: intel_msic: Use DEFINE_RES_IRQ() macro mfd: motorola-cpcap: Add audio-codec support mfd: mc13xxx-core: Fix PMIC shutdown when reading ADC values mfd: madera: Remove unused forward reference mfd: max77620: Convert to using %pOFn instead of device_node.name mfd: madera: Don't use regmap_read_poll_timeout to poll for BOOT_DONE ...
- Loading branch information
Showing
72 changed files
with
1,045 additions
and
733 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
// SPDX-License-Identifier: GPL-2.0 | ||
/* | ||
* Driver for AT91 USART | ||
* | ||
* Copyright (C) 2018 Microchip Technology | ||
* | ||
* Author: Radu Pirea <radu.pirea@microchip.com> | ||
* | ||
*/ | ||
|
||
#include <dt-bindings/mfd/at91-usart.h> | ||
|
||
#include <linux/module.h> | ||
#include <linux/mfd/core.h> | ||
#include <linux/of.h> | ||
#include <linux/property.h> | ||
|
||
static struct mfd_cell at91_usart_spi_subdev = { | ||
.name = "at91_usart_spi", | ||
.of_compatible = "microchip,at91sam9g45-usart-spi", | ||
}; | ||
|
||
static struct mfd_cell at91_usart_serial_subdev = { | ||
.name = "atmel_usart_serial", | ||
.of_compatible = "atmel,at91rm9200-usart-serial", | ||
}; | ||
|
||
static int at91_usart_mode_probe(struct platform_device *pdev) | ||
{ | ||
struct mfd_cell cell; | ||
u32 opmode = AT91_USART_MODE_SERIAL; | ||
|
||
device_property_read_u32(&pdev->dev, "atmel,usart-mode", &opmode); | ||
|
||
switch (opmode) { | ||
case AT91_USART_MODE_SPI: | ||
cell = at91_usart_spi_subdev; | ||
break; | ||
case AT91_USART_MODE_SERIAL: | ||
cell = at91_usart_serial_subdev; | ||
break; | ||
default: | ||
dev_err(&pdev->dev, "atmel,usart-mode has an invalid value %u\n", | ||
opmode); | ||
return -EINVAL; | ||
} | ||
|
||
return devm_mfd_add_devices(&pdev->dev, PLATFORM_DEVID_AUTO, &cell, 1, | ||
NULL, 0, NULL); | ||
} | ||
|
||
static const struct of_device_id at91_usart_mode_of_match[] = { | ||
{ .compatible = "atmel,at91rm9200-usart" }, | ||
{ .compatible = "atmel,at91sam9260-usart" }, | ||
{ /* sentinel */ } | ||
}; | ||
|
||
MODULE_DEVICE_TABLE(of, at91_usart_mode_of_match); | ||
|
||
static struct platform_driver at91_usart_mfd = { | ||
.probe = at91_usart_mode_probe, | ||
.driver = { | ||
.name = "at91_usart_mode", | ||
.of_match_table = at91_usart_mode_of_match, | ||
}, | ||
}; | ||
|
||
module_platform_driver(at91_usart_mfd); | ||
|
||
MODULE_AUTHOR("Radu Pirea <radu.pirea@microchip.com>"); | ||
MODULE_DESCRIPTION("AT91 USART MFD driver"); | ||
MODULE_LICENSE("GPL v2"); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.