linux/drivers/input/misc/pm8941-pwrkey.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Copyright (c) 2010-2011, 2020-2021, The Linux Foundation. All rights reserved.
 * Copyright (c) 2014, Sony Mobile Communications Inc.
 */

#include <linux/delay.h>
#include <linux/errno.h>
#include <linux/input.h>
#include <linux/interrupt.h>
#include <linux/kernel.h>
#include <linux/ktime.h>
#include <linux/log2.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/of_address.h>
#include <linux/platform_device.h>
#include <linux/reboot.h>
#include <linux/regmap.h>

#define PON_REV2

#define PON_SUBTYPE

#define PON_SUBTYPE_PRIMARY
#define PON_SUBTYPE_SECONDARY
#define PON_SUBTYPE_1REG
#define PON_SUBTYPE_GEN2_PRIMARY
#define PON_SUBTYPE_GEN2_SECONDARY
#define PON_SUBTYPE_GEN3_PBS
#define PON_SUBTYPE_GEN3_HLOS

#define PON_RT_STS
#define PON_KPDPWR_N_SET
#define PON_RESIN_N_SET
#define PON_GEN3_RESIN_N_SET
#define PON_GEN3_KPDPWR_N_SET

#define PON_PS_HOLD_RST_CTL
#define PON_PS_HOLD_RST_CTL2
#define PON_PS_HOLD_ENABLE
#define PON_PS_HOLD_TYPE_MASK
#define PON_PS_HOLD_TYPE_WARM_RESET
#define PON_PS_HOLD_TYPE_SHUTDOWN
#define PON_PS_HOLD_TYPE_HARD_RESET

#define PON_PULL_CTL
#define PON_KPDPWR_PULL_UP
#define PON_RESIN_PULL_UP

#define PON_DBC_CTL
#define PON_DBC_DELAY_MASK_GEN1
#define PON_DBC_DELAY_MASK_GEN2
#define PON_DBC_SHIFT_GEN1
#define PON_DBC_SHIFT_GEN2

struct pm8941_data {};

struct pm8941_pwrkey {};

static int pm8941_reboot_notify(struct notifier_block *nb,
				unsigned long code, void *unused)
{}

static irqreturn_t pm8941_pwrkey_irq(int irq, void *_data)
{}

static int pm8941_pwrkey_sw_debounce_init(struct pm8941_pwrkey *pwrkey)
{}

static int pm8941_pwrkey_suspend(struct device *dev)
{}

static int pm8941_pwrkey_resume(struct device *dev)
{}

static DEFINE_SIMPLE_DEV_PM_OPS(pm8941_pwr_key_pm_ops,
				pm8941_pwrkey_suspend, pm8941_pwrkey_resume);

static int pm8941_pwrkey_probe(struct platform_device *pdev)
{}

static void pm8941_pwrkey_remove(struct platform_device *pdev)
{}

static const struct pm8941_data pwrkey_data =;

static const struct pm8941_data resin_data =;

static const struct pm8941_data pon_gen3_pwrkey_data =;

static const struct pm8941_data pon_gen3_resin_data =;

static const struct of_device_id pm8941_pwr_key_id_table[] =;
MODULE_DEVICE_TABLE(of, pm8941_pwr_key_id_table);

static struct platform_driver pm8941_pwrkey_driver =;
module_platform_driver();

MODULE_DESCRIPTION();
MODULE_LICENSE();