moxart_rtc 69 drivers/rtc/rtc-moxart.c struct moxart_rtc *moxart_rtc = dev_get_drvdata(dev); moxart_rtc 73 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_sclk, 0); moxart_rtc 74 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_data, ((data & 1) == 1)); moxart_rtc 76 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_sclk, 1); moxart_rtc 83 drivers/rtc/rtc-moxart.c struct moxart_rtc *moxart_rtc = dev_get_drvdata(dev); moxart_rtc 88 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_sclk, 0); moxart_rtc 90 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_sclk, 1); moxart_rtc 92 drivers/rtc/rtc-moxart.c if (gpio_get_value(moxart_rtc->gpio_data)) moxart_rtc 101 drivers/rtc/rtc-moxart.c struct moxart_rtc *moxart_rtc = dev_get_drvdata(dev); moxart_rtc 107 drivers/rtc/rtc-moxart.c gpio_direction_output(moxart_rtc->gpio_data, 0); moxart_rtc 108 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_reset, 1); moxart_rtc 111 drivers/rtc/rtc-moxart.c gpio_direction_input(moxart_rtc->gpio_data); moxart_rtc 114 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_sclk, 0); moxart_rtc 115 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_reset, 0); moxart_rtc 125 drivers/rtc/rtc-moxart.c struct moxart_rtc *moxart_rtc = dev_get_drvdata(dev); moxart_rtc 130 drivers/rtc/rtc-moxart.c gpio_direction_output(moxart_rtc->gpio_data, 0); moxart_rtc 131 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_reset, 1); moxart_rtc 135 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_sclk, 0); moxart_rtc 136 drivers/rtc/rtc-moxart.c gpio_set_value(moxart_rtc->gpio_reset, 0); moxart_rtc 144 drivers/rtc/rtc-moxart.c struct moxart_rtc *moxart_rtc = dev_get_drvdata(dev); moxart_rtc 146 drivers/rtc/rtc-moxart.c spin_lock_irq(&moxart_rtc->rtc_lock); moxart_rtc 175 drivers/rtc/rtc-moxart.c spin_unlock_irq(&moxart_rtc->rtc_lock); moxart_rtc 187 drivers/rtc/rtc-moxart.c struct moxart_rtc *moxart_rtc = dev_get_drvdata(dev); moxart_rtc 190 drivers/rtc/rtc-moxart.c spin_lock_irq(&moxart_rtc->rtc_lock); moxart_rtc 234 drivers/rtc/rtc-moxart.c spin_unlock_irq(&moxart_rtc->rtc_lock); moxart_rtc 246 drivers/rtc/rtc-moxart.c struct moxart_rtc *moxart_rtc; moxart_rtc 249 drivers/rtc/rtc-moxart.c moxart_rtc = devm_kzalloc(&pdev->dev, sizeof(*moxart_rtc), GFP_KERNEL); moxart_rtc 250 drivers/rtc/rtc-moxart.c if (!moxart_rtc) moxart_rtc 253 drivers/rtc/rtc-moxart.c moxart_rtc->gpio_data = of_get_named_gpio(pdev->dev.of_node, moxart_rtc 255 drivers/rtc/rtc-moxart.c if (!gpio_is_valid(moxart_rtc->gpio_data)) { moxart_rtc 257 drivers/rtc/rtc-moxart.c moxart_rtc->gpio_data); moxart_rtc 258 drivers/rtc/rtc-moxart.c return moxart_rtc->gpio_data; moxart_rtc 261 drivers/rtc/rtc-moxart.c moxart_rtc->gpio_sclk = of_get_named_gpio(pdev->dev.of_node, moxart_rtc 263 drivers/rtc/rtc-moxart.c if (!gpio_is_valid(moxart_rtc->gpio_sclk)) { moxart_rtc 265 drivers/rtc/rtc-moxart.c moxart_rtc->gpio_sclk); moxart_rtc 266 drivers/rtc/rtc-moxart.c return moxart_rtc->gpio_sclk; moxart_rtc 269 drivers/rtc/rtc-moxart.c moxart_rtc->gpio_reset = of_get_named_gpio(pdev->dev.of_node, moxart_rtc 271 drivers/rtc/rtc-moxart.c if (!gpio_is_valid(moxart_rtc->gpio_reset)) { moxart_rtc 273 drivers/rtc/rtc-moxart.c moxart_rtc->gpio_reset); moxart_rtc 274 drivers/rtc/rtc-moxart.c return moxart_rtc->gpio_reset; moxart_rtc 277 drivers/rtc/rtc-moxart.c spin_lock_init(&moxart_rtc->rtc_lock); moxart_rtc 278 drivers/rtc/rtc-moxart.c platform_set_drvdata(pdev, moxart_rtc); moxart_rtc 280 drivers/rtc/rtc-moxart.c ret = devm_gpio_request(&pdev->dev, moxart_rtc->gpio_data, "rtc_data"); moxart_rtc 286 drivers/rtc/rtc-moxart.c ret = devm_gpio_request_one(&pdev->dev, moxart_rtc->gpio_sclk, moxart_rtc 293 drivers/rtc/rtc-moxart.c ret = devm_gpio_request_one(&pdev->dev, moxart_rtc->gpio_reset, moxart_rtc 300 drivers/rtc/rtc-moxart.c moxart_rtc->rtc = devm_rtc_device_register(&pdev->dev, pdev->name, moxart_rtc 303 drivers/rtc/rtc-moxart.c if (IS_ERR(moxart_rtc->rtc)) { moxart_rtc 305 drivers/rtc/rtc-moxart.c return PTR_ERR(moxart_rtc->rtc);