Initial commit: Linux kernel 4.19 for Unplugged OS

This commit is contained in:
ziv committed 2025-10-06 13:52:42 +00:00
commit d30235b04c
80519 files changed
+35800681

No files matched your search

+97
View File
@@ -0,0 +1,97 @@
/*
* Definitions for DA9063 MFD driver
*
* Copyright 2012 Dialog Semiconductor Ltd.
*
* Author: Michal Hajduk, Dialog Semiconductor
* Author: Krystian Garbaciak, Dialog Semiconductor
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*/
#ifndef __MFD_DA9063_CORE_H__
#define __MFD_DA9063_CORE_H__
#include <linux/interrupt.h>
#include <linux/mfd/da9063/registers.h>
/* DA9063 modules */
#define DA9063_DRVNAME_CORE "da9063-core"
#define DA9063_DRVNAME_REGULATORS "da9063-regulators"
#define DA9063_DRVNAME_LEDS "da9063-leds"
#define DA9063_DRVNAME_WATCHDOG "da9063-watchdog"
#define DA9063_DRVNAME_HWMON "da9063-hwmon"
#define DA9063_DRVNAME_ONKEY "da9063-onkey"
#define DA9063_DRVNAME_RTC "da9063-rtc"
#define DA9063_DRVNAME_VIBRATION "da9063-vibration"
#define PMIC_CHIP_ID_DA9063 0x61
enum da9063_type {
PMIC_TYPE_DA9063 = 0,
PMIC_TYPE_DA9063L,
};
enum da9063_variant_codes {
PMIC_DA9063_AD = 0x3,
PMIC_DA9063_BB = 0x5,
PMIC_DA9063_CA = 0x6,
};
/* Interrupts */
enum da9063_irqs {
DA9063_IRQ_ONKEY = 0,
DA9063_IRQ_ALARM,
DA9063_IRQ_TICK,
DA9063_IRQ_ADC_RDY,
DA9063_IRQ_SEQ_RDY,
DA9063_IRQ_WAKE,
DA9063_IRQ_TEMP,
DA9063_IRQ_COMP_1V2,
DA9063_IRQ_LDO_LIM,
DA9063_IRQ_REG_UVOV,
DA9063_IRQ_DVC_RDY,
DA9063_IRQ_VDD_MON,
DA9063_IRQ_WARN,
DA9063_IRQ_GPI0,
DA9063_IRQ_GPI1,
DA9063_IRQ_GPI2,
DA9063_IRQ_GPI3,
DA9063_IRQ_GPI4,
DA9063_IRQ_GPI5,
DA9063_IRQ_GPI6,
DA9063_IRQ_GPI7,
DA9063_IRQ_GPI8,
DA9063_IRQ_GPI9,
DA9063_IRQ_GPI10,
DA9063_IRQ_GPI11,
DA9063_IRQ_GPI12,
DA9063_IRQ_GPI13,
DA9063_IRQ_GPI14,
DA9063_IRQ_GPI15,
};
struct da9063 {
/* Device */
struct device *dev;
enum da9063_type type;
unsigned char variant_code;
unsigned int flags;
/* Control interface */
struct regmap *regmap;
/* Interrupts */
int chip_irq;
unsigned int irq_base;
struct regmap_irq_chip_data *regmap_irq;
};
int da9063_device_init(struct da9063 *da9063, unsigned int irq);
int da9063_irq_init(struct da9063 *da9063);
#endif /* __MFD_DA9063_CORE_H__ */
+114
View File
@@ -0,0 +1,114 @@
/*
* Platform configuration options for DA9063
*
* Copyright 2012 Dialog Semiconductor Ltd.
*
* Author: Michal Hajduk, Dialog Semiconductor
* Author: Krystian Garbaciak, Dialog Semiconductor
*
* This program is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License as published by the
* Free Software Foundation; either version 2 of the License, or (at your
* option) any later version.
*
*/
#ifndef __MFD_DA9063_PDATA_H__
#define __MFD_DA9063_PDATA_H__
#include <linux/regulator/machine.h>
/*
* Regulator configuration
*/
/* DA9063 and DA9063L regulator IDs */
enum {
/* BUCKs */
DA9063_ID_BCORE1,
DA9063_ID_BCORE2,
DA9063_ID_BPRO,
DA9063_ID_BMEM,
DA9063_ID_BIO,
DA9063_ID_BPERI,
/* BCORE1 and BCORE2 in merged mode */
DA9063_ID_BCORES_MERGED,
/* BMEM and BIO in merged mode */
DA9063_ID_BMEM_BIO_MERGED,
/* When two BUCKs are merged, they cannot be reused separately */
/* LDOs on both DA9063 and DA9063L */
DA9063_ID_LDO3,
DA9063_ID_LDO7,
DA9063_ID_LDO8,
DA9063_ID_LDO9,
DA9063_ID_LDO11,
/* DA9063-only LDOs */
DA9063_ID_LDO1,
DA9063_ID_LDO2,
DA9063_ID_LDO4,
DA9063_ID_LDO5,
DA9063_ID_LDO6,
DA9063_ID_LDO10,
};
/* Regulators platform data */
struct da9063_regulator_data {
int id;
struct regulator_init_data *initdata;
};
struct da9063_regulators_pdata {
unsigned n_regulators;
struct da9063_regulator_data *regulator_data;
};
/*
* RGB LED configuration
*/
/* LED IDs for flags in struct led_info. */
enum {
DA9063_GPIO11_LED,
DA9063_GPIO14_LED,
DA9063_GPIO15_LED,
DA9063_LED_NUM
};
#define DA9063_LED_ID_MASK 0x3
/* LED polarity for flags in struct led_info. */
#define DA9063_LED_HIGH_LEVEL_ACTIVE 0x0
#define DA9063_LED_LOW_LEVEL_ACTIVE 0x4
/*
* General PMIC configuration
*/
/* HWMON ADC channels configuration */
#define DA9063_FLG_FORCE_IN0_MANUAL_MODE 0x0010
#define DA9063_FLG_FORCE_IN0_AUTO_MODE 0x0020
#define DA9063_FLG_FORCE_IN1_MANUAL_MODE 0x0040
#define DA9063_FLG_FORCE_IN1_AUTO_MODE 0x0080
#define DA9063_FLG_FORCE_IN2_MANUAL_MODE 0x0100
#define DA9063_FLG_FORCE_IN2_AUTO_MODE 0x0200
#define DA9063_FLG_FORCE_IN3_MANUAL_MODE 0x0400
#define DA9063_FLG_FORCE_IN3_AUTO_MODE 0x0800
/* Disable register caching. */
#define DA9063_FLG_NO_CACHE 0x0008
struct da9063;
/* DA9063 platform data */
struct da9063_pdata {
int (*init)(struct da9063 *da9063);
int irq_base;
bool key_power;
unsigned flags;
struct da9063_regulators_pdata *regulators_pdata;
struct led_platform_data *leds_pdata;
};
#endif /* __MFD_DA9063_PDATA_H__ */
File diff suppressed because it is too large. Load diff