is_dc_charge = <1>;
is_usb_charge = <0>;
};
-
- rtc@d {
+
+ rtc@51 {
compatible = "rtc,hym8563";
- reg = <0xd>;
- irq_gpio = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
+ reg = <0x51>;
+ irq_gpio = <&gpio0 GPIO_A4 IRQ_TYPE_EDGE_FALLING>;
};
};
is_usb_charge = <0>;
};
- rtc@d {
+ rtc@51 {
compatible = "rtc,hym8563";
- reg = <0xd>;
- irq_gpio = <&gpio0 GPIO_A4 GPIO_ACTIVE_LOW>;
+ reg = <0x51>;
+ irq_gpio = <&gpio0 GPIO_A4 IRQ_TYPE_EDGE_FALLING>;
};
};
CONFIG_USB_GADGET_DEBUG_FILES=y
CONFIG_USB_GADGET_VBUS_DRAW=500
CONFIG_USB_G_ANDROID=y
-CONFIG_DWC_OTG_310=y
CONFIG_USB20_HOST=y
CONFIG_USB20_OTG=y
CONFIG_MMC=y
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
CONFIG_SWITCH=y
CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_PCF8563=y
+CONFIG_RTC_HYM8563=y
CONFIG_RK808_RTC=y
CONFIG_RTC_DRV_RC5T619=y
CONFIG_STAGING=y
#include <linux/slab.h>
#include "rtc-HYM8563.h"
#include <linux/of_gpio.h>
+#include <linux/irqdomain.h>
#define RTC_SPEED 200 * 1000
struct hym8563 {
goto exit;
}
enable_irq_wake(hym8563->irq);
-
- rtc = rtc_device_register(client->name, &client->dev,
- &hym8563_rtc_ops, THIS_MODULE);
+ device_init_wakeup(&client->dev, 1);
+ rtc = devm_rtc_device_register(&client->dev,
+ client->name,
+ &hym8563_rtc_ops, THIS_MODULE);
if (IS_ERR(rtc)) {
rc = PTR_ERR(rtc);
rtc = NULL;