mirror of
https://github.com/raspberrypi/linux.git
synced 2025-12-15 22:41:38 +00:00
Pull powerpc updates from Michael Ellerman:
- Add HOTPLUG_SMT support (/sys/devices/system/cpu/smt) and honour the
configured SMT state when hotplugging CPUs into the system
- Combine final TLB flush and lazy TLB mm shootdown IPIs when using the
Radix MMU to avoid a broadcast TLBIE flush on exit
- Drop the exclusion between ptrace/perf watchpoints, and drop the now
unused associated arch hooks
- Add support for the "nohlt" command line option to disable CPU idle
- Add support for -fpatchable-function-entry for ftrace, with GCC >=
13.1
- Rework memory block size determination, and support 256MB size on
systems with GPUs that have hotpluggable memory
- Various other small features and fixes
Thanks to Andrew Donnellan, Aneesh Kumar K.V, Arnd Bergmann, Athira
Rajeev, Benjamin Gray, Christophe Leroy, Frederic Barrat, Gautam
Menghani, Geoff Levand, Hari Bathini, Immad Mir, Jialin Zhang, Joel
Stanley, Jordan Niethe, Justin Stitt, Kajol Jain, Kees Cook, Krzysztof
Kozlowski, Laurent Dufour, Liang He, Linus Walleij, Mahesh Salgaonkar,
Masahiro Yamada, Michal Suchanek, Nageswara R Sastry, Nathan Chancellor,
Nathan Lynch, Naveen N Rao, Nicholas Piggin, Nick Desaulniers, Omar
Sandoval, Randy Dunlap, Reza Arbab, Rob Herring, Russell Currey, Sourabh
Jain, Thomas Gleixner, Trevor Woerner, Uwe Kleine-König, Vaibhav Jain,
Xiongfeng Wang, Yuan Tan, Zhang Rui, and Zheng Zengkai.
* tag 'powerpc-6.6-1' of git://git.kernel.org/pub/scm/linux/kernel/git/powerpc/linux: (135 commits)
macintosh/ams: linux/platform_device.h is needed
powerpc/xmon: Reapply "Relax frame size for clang"
powerpc/mm/book3s64: Use 256M as the upper limit with coherent device memory attached
powerpc/mm/book3s64: Fix build error with SPARSEMEM disabled
powerpc/iommu: Fix notifiers being shared by PCI and VIO buses
powerpc/mpc5xxx: Add missing fwnode_handle_put()
powerpc/config: Disable SLAB_DEBUG_ON in skiroot
powerpc/pseries: Remove unused hcall tracing instruction
powerpc/pseries: Fix hcall tracepoints with JUMP_LABEL=n
powerpc: dts: add missing space before {
powerpc/eeh: Use pci_dev_id() to simplify the code
powerpc/64s: Move CPU -mtune options into Kconfig
powerpc/powermac: Fix unused function warning
powerpc/pseries: Rework lppaca_shared_proc() to avoid DEBUG_PREEMPT
powerpc: Don't include lppaca.h in paca.h
powerpc/pseries: Move hcall_vphn() prototype into vphn.h
powerpc/pseries: Move VPHN constants into vphn.h
cxl: Drop unused detach_spa()
powerpc: Drop zalloc_maybe_bootmem()
powerpc/powernv: Use struct opal_prd_msg in more places
...
77 lines
1.4 KiB
C
77 lines
1.4 KiB
C
/* SPDX-License-Identifier: GPL-2.0 */
|
|
#ifndef _AMS_H
|
|
#define _AMS_H
|
|
|
|
#include <linux/i2c.h>
|
|
#include <linux/input.h>
|
|
#include <linux/kthread.h>
|
|
#include <linux/mutex.h>
|
|
#include <linux/platform_device.h>
|
|
#include <linux/spinlock.h>
|
|
#include <linux/types.h>
|
|
|
|
enum ams_irq {
|
|
AMS_IRQ_FREEFALL = 0x01,
|
|
AMS_IRQ_SHOCK = 0x02,
|
|
AMS_IRQ_GLOBAL = 0x04,
|
|
AMS_IRQ_ALL =
|
|
AMS_IRQ_FREEFALL |
|
|
AMS_IRQ_SHOCK |
|
|
AMS_IRQ_GLOBAL,
|
|
};
|
|
|
|
struct ams {
|
|
/* Locks */
|
|
spinlock_t irq_lock;
|
|
struct mutex lock;
|
|
|
|
/* General properties */
|
|
struct device_node *of_node;
|
|
struct platform_device *of_dev;
|
|
char has_device;
|
|
char vflag;
|
|
u32 orient1;
|
|
u32 orient2;
|
|
|
|
/* Interrupt worker */
|
|
struct work_struct worker;
|
|
u8 worker_irqs;
|
|
|
|
/* Implementation
|
|
*
|
|
* Only call these functions with the main lock held.
|
|
*/
|
|
void (*exit)(void);
|
|
|
|
void (*get_xyz)(s8 *x, s8 *y, s8 *z);
|
|
u8 (*get_vendor)(void);
|
|
|
|
void (*clear_irq)(enum ams_irq reg);
|
|
|
|
#ifdef CONFIG_SENSORS_AMS_I2C
|
|
/* I2C properties */
|
|
struct i2c_client *i2c_client;
|
|
#endif
|
|
|
|
/* Joystick emulation */
|
|
struct input_dev *idev;
|
|
__u16 bustype;
|
|
|
|
/* calibrated null values */
|
|
int xcalib, ycalib, zcalib;
|
|
};
|
|
|
|
extern struct ams ams_info;
|
|
|
|
extern void ams_sensors(s8 *x, s8 *y, s8 *z);
|
|
extern int ams_sensor_attach(void);
|
|
extern void ams_sensor_detach(void);
|
|
|
|
extern int ams_pmu_init(struct device_node *np);
|
|
extern int ams_i2c_init(struct device_node *np);
|
|
|
|
extern int ams_input_init(void);
|
|
extern void ams_input_exit(void);
|
|
|
|
#endif /* _AMS_H */
|