Lines Matching defs:tsa_serial
126 struct tsa_serial {
132 static inline struct tsa *tsa_serial_get_tsa(struct tsa_serial *tsa_serial)
135 return container_of(tsa_serial, struct tsa, serials[tsa_serial->id]);
163 int tsa_serial_connect(struct tsa_serial *tsa_serial)
165 struct tsa *tsa = tsa_serial_get_tsa(tsa_serial);
170 switch (tsa_serial->id) {
184 dev_err(tsa->dev, "Unsupported serial id %u\n", tsa_serial->id);
196 int tsa_serial_disconnect(struct tsa_serial *tsa_serial)
198 struct tsa *tsa = tsa_serial_get_tsa(tsa_serial);
202 switch (tsa_serial->id) {
213 dev_err(tsa->dev, "Unsupported serial id %u\n", tsa_serial->id);
225 int tsa_serial_get_info(struct tsa_serial *tsa_serial, struct tsa_serial_info *info)
227 memcpy(info, &tsa_serial->info, sizeof(*info));
751 struct tsa_serial *tsa_serial_get_byphandle(struct device_node *np,
756 struct tsa_serial *tsa_serial;
790 tsa_serial = &tsa->serials[out_args.args[0]];
797 if (WARN_ON(tsa_serial->id != out_args.args[0])) {
802 return tsa_serial;
806 void tsa_serial_put(struct tsa_serial *tsa_serial)
808 struct tsa *tsa = tsa_serial_get_tsa(tsa_serial);
816 struct tsa_serial **tsa_serial = res;
818 tsa_serial_put(*tsa_serial);
821 struct tsa_serial *devm_tsa_serial_get_byphandle(struct device *dev,
825 struct tsa_serial *tsa_serial;
826 struct tsa_serial **dr;
832 tsa_serial = tsa_serial_get_byphandle(np, phandle_name);
833 if (!IS_ERR(tsa_serial)) {
834 *dr = tsa_serial;
840 return tsa_serial;