mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-31 16:38:12 +00:00
97fb5e8d9b
Based on 1 normalized pattern(s): this program is free software you can redistribute it and or modify it under the terms of the gnu general public license version 2 and only version 2 as published by the free software foundation this program is distributed in the hope that it will be useful but without any warranty without even the implied warranty of merchantability or fitness for a particular purpose see the gnu general public license for more details extracted by the scancode license scanner the SPDX license identifier GPL-2.0-only has been chosen to replace the boilerplate/reference in 294 file(s). Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Reviewed-by: Allison Randal <allison@lohutok.net> Reviewed-by: Alexios Zavras <alexios.zavras@intel.com> Cc: linux-spdx@vger.kernel.org Link: https://lkml.kernel.org/r/20190529141900.825281744@linutronix.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
35 lines
726 B
C
35 lines
726 B
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
/* Copyright (C) 2010 Google, Inc.
|
|
* Copyright (c) 2011, Code Aurora Forum. All rights reserved.
|
|
* Author: Dima Zavin <dima@android.com>
|
|
*/
|
|
|
|
#ifndef _LINUX_SSBI_H
|
|
#define _LINUX_SSBI_H
|
|
|
|
#include <linux/types.h>
|
|
|
|
int ssbi_write(struct device *dev, u16 addr, const u8 *buf, int len);
|
|
int ssbi_read(struct device *dev, u16 addr, u8 *buf, int len);
|
|
|
|
static inline int
|
|
ssbi_reg_read(void *context, unsigned int reg, unsigned int *val)
|
|
{
|
|
int ret;
|
|
u8 v;
|
|
|
|
ret = ssbi_read(context, reg, &v, 1);
|
|
if (!ret)
|
|
*val = v;
|
|
|
|
return ret;
|
|
}
|
|
|
|
static inline int
|
|
ssbi_reg_write(void *context, unsigned int reg, unsigned int val)
|
|
{
|
|
u8 v = val;
|
|
return ssbi_write(context, reg, &v, 1);
|
|
}
|
|
|
|
#endif
|