#include <linux/delay.h>
#include <linux/gpio/consumer.h>
#include <linux/interrupt.h>
-#include <linux/of_irq.h>
#include <linux/module.h>
#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/pm.h>
+#include <linux/property.h>
#include <linux/regulator/consumer.h>
#include <linux/spinlock.h>
+#include <linux/mod_devicetable.h>
#include "arche_platform.h"
static void apb_bootret_deassert(struct device *dev);
static DEVICE_ATTR_RW(state);
-static int apb_ctrl_get_devtree_data(struct platform_device *pdev,
- struct arche_apb_ctrl_drvdata *apb)
+static int apb_ctrl_get_fw_data(struct platform_device *pdev,
+ struct arche_apb_ctrl_drvdata *apb)
{
struct device *dev = &pdev->dev;
int ret;
}
/* Only applicable for platform >= V2 */
- if (of_property_read_bool(pdev->dev.of_node, "gb,spi-en-active-high"))
+ if (device_property_read_bool(&pdev->dev, "gb,spi-en-active-high"))
apb->spi_en_polarity_high = true;
return 0;
if (!apb)
return -ENOMEM;
- ret = apb_ctrl_get_devtree_data(pdev, apb);
+ ret = apb_ctrl_get_fw_data(pdev, apb);
if (ret) {
dev_err(dev, "failed to get apb devicetree data %d\n", ret);
return ret;
/* Initially set APB to OFF state */
apb->state = ARCHE_PLATFORM_STATE_OFF;
/* Check whether device needs to be enabled on boot */
- if (of_property_read_bool(pdev->dev.of_node, "arche,init-disable"))
+ if (device_property_read_bool(&pdev->dev, "arche,init-disable"))
apb->init_disabled = true;
platform_set_drvdata(pdev, apb);