Revision 676fc8de319335b840934c57ec75bdbbf049b738 authored by Linus Torvalds on 07 March 2020, 13:59:30 UTC, committed by Linus Torvalds on 07 March 2020, 13:59:30 UTC
Pull sound fixes from Takashi Iwai:
 "The regular "bump-in-the-middle" updates, containing mostly ASoC-
  related fixes at this time. All changes are reasonably small.

  A few entries are for ASoC and ALSA core parts (DAPM, PCM, topology)
  for followups of the recent changes and potential buffer overflow by
  snprintf(), while the rest are (both new and old) device-specific
  fixes for Intel, meson, tas2562, rt1015, as well as the usual HD-audio
  quirks"

* tag 'sound-5.6-rc5' of git://git.kernel.org/pub/scm/linux/kernel/git/tiwai/sound: (25 commits)
  ALSA: sgio2audio: Remove usage of dropped hw_params/hw_free functions
  ALSA: hda/realtek - Enable the headset of ASUS B9450FA with ALC294
  ALSA: hda/realtek - Fix silent output on Gigabyte X570 Aorus Master
  ALSA: hda/realtek - Add Headset Button supported for ThinkPad X1
  ALSA: hda/realtek - Add Headset Mic supported
  ASoC: wm8741: Fix typo in Kconfig prompt
  ASoC: stm32: sai: manage rebind issue
  ASoC: SOF: Fix snd_sof_ipc_stream_posn()
  ASoC: rt1015: modify pre-divider for sysclk
  ASoC: rt1015: add operation callback function for rt1015_dai[]
  ASoC: soc-component: tidyup snd_soc_pcm_component_sync_stop()
  ASoC: dapm: Correct DAPM handling of active widgets during shutdown
  ASoC: tas2562: Fix sample rate error message
  ASoC: Intel: Skylake: Fix available clock counter incrementation
  ASoC: soc-pcm/soc-compress: don't use snd_soc_dapm_stream_stop()
  ASoC: meson: g12a: add tohdmitx reset
  ASoC: pcm512x: Fix unbalanced regulator enable call in probe error path
  ASoC: soc-core: fix for_rtd_codec_dai_rollback() macro
  ASoC: topology: Fix memleak in soc_tplg_manifest_load()
  ASoC: topology: Fix memleak in soc_tplg_link_elems_load()
  ...
2 parent s 63849c8 + 5a56996
Raw File
siox.h
/* SPDX-License-Identifier: GPL-2.0 */
/*
 * Copyright (C) 2015-2017 Pengutronix, Uwe Kleine-König <kernel@pengutronix.de>
 */
#include <linux/kernel.h>
#include <linux/kthread.h>
#include <linux/siox.h>

#define to_siox_master(_dev)	container_of((_dev), struct siox_master, dev)
struct siox_master {
	/* these fields should be initialized by the driver */
	int busno;
	int (*pushpull)(struct siox_master *smaster,
			size_t setbuf_len, const u8 setbuf[],
			size_t getbuf_len, u8 getbuf[]);

	/* might be initialized by the driver, if 0 it is set to HZ / 40 */
	unsigned long poll_interval; /* in jiffies */

	/* framework private stuff */
	struct mutex lock;
	bool active;
	struct module *owner;
	struct device dev;
	unsigned int num_devices;
	struct list_head devices;

	size_t setbuf_len, getbuf_len;
	size_t buf_len;
	u8 *buf;
	u8 status;

	unsigned long last_poll;
	struct task_struct *poll_thread;
};

static inline void *siox_master_get_devdata(struct siox_master *smaster)
{
	return dev_get_drvdata(&smaster->dev);
}

struct siox_master *siox_master_alloc(struct device *dev, size_t size);
static inline void siox_master_put(struct siox_master *smaster)
{
	put_device(&smaster->dev);
}

int siox_master_register(struct siox_master *smaster);
void siox_master_unregister(struct siox_master *smaster);
back to top