| .. | .. |
|---|
| 1 | +/* SPDX-License-Identifier: GPL-2.0-only */ |
|---|
| 1 | 2 | /* |
|---|
| 2 | 3 | * OMAP4 Bandgap temperature sensor driver |
|---|
| 3 | 4 | * |
|---|
| 4 | 5 | * Copyright (C) 2011 Texas Instruments Incorporated - http://www.ti.com/ |
|---|
| 5 | 6 | * Contact: |
|---|
| 6 | 7 | * Eduardo Valentin <eduardo.valentin@ti.com> |
|---|
| 7 | | - * |
|---|
| 8 | | - * This program is free software; you can redistribute it and/or |
|---|
| 9 | | - * modify it under the terms of the GNU General Public License |
|---|
| 10 | | - * version 2 as published by the Free Software Foundation. |
|---|
| 11 | | - * |
|---|
| 12 | | - * This program is distributed in the hope that it will be useful, but |
|---|
| 13 | | - * WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | | - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
|---|
| 15 | | - * General Public License for more details. |
|---|
| 16 | | - * |
|---|
| 17 | | - * You should have received a copy of the GNU General Public License |
|---|
| 18 | | - * along with this program; if not, write to the Free Software |
|---|
| 19 | | - * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA |
|---|
| 20 | | - * 02110-1301 USA |
|---|
| 21 | | - * |
|---|
| 22 | 8 | */ |
|---|
| 23 | 9 | #ifndef __TI_BANDGAP_H |
|---|
| 24 | 10 | #define __TI_BANDGAP_H |
|---|
| .. | .. |
|---|
| 26 | 12 | #include <linux/spinlock.h> |
|---|
| 27 | 13 | #include <linux/types.h> |
|---|
| 28 | 14 | #include <linux/err.h> |
|---|
| 15 | +#include <linux/cpu_pm.h> |
|---|
| 16 | +#include <linux/device.h> |
|---|
| 17 | +#include <linux/pm_runtime.h> |
|---|
| 18 | +#include <linux/pm.h> |
|---|
| 19 | + |
|---|
| 20 | +struct gpio_desc; |
|---|
| 29 | 21 | |
|---|
| 30 | 22 | /** |
|---|
| 31 | 23 | * DOC: bandgap driver data structure |
|---|
| .. | .. |
|---|
| 213 | 205 | struct clk *div_clk; |
|---|
| 214 | 206 | spinlock_t lock; /* shields this struct */ |
|---|
| 215 | 207 | int irq; |
|---|
| 216 | | - int tshut_gpio; |
|---|
| 208 | + struct gpio_desc *tshut_gpiod; |
|---|
| 217 | 209 | u32 clk_rate; |
|---|
| 210 | + struct notifier_block nb; |
|---|
| 211 | + unsigned int is_suspended:1; |
|---|
| 218 | 212 | }; |
|---|
| 219 | 213 | |
|---|
| 220 | 214 | /** |
|---|